LinkedIn Interview Question

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.

Interview Answers

Anonymous

Nov 5, 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

Anonymous

Sep 30, 2019

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