Pergunta de entrevista da empresa LinkedIn

Given a interaction where hovering a link displays a tooltip of dynamic information (e.g.- Ajax), write the basic functions to perform the lookup (yes, jQuery is allowed) and explain how you'd cache the results so an HTTP request wasn't made if the tooltip already existed.

Respostas da entrevista

Sigiloso

5 de nov. de 2014

Basic jQuery.ajax() event but store the result in a global object by the ID used for lookup, then have the function look for this object before making the Ajax request.

5

Sigiloso

30 de set. de 2019

I would append tooltip content by attaching dynamic I’d and look for I’d second before making Ajax