Commit 783bfb8a authored by Kjetil Thuen's avatar Kjetil Thuen

Improved debouncing.

parent 963051b0
......@@ -71,6 +71,9 @@
settings.extendedInfoFunc(listElem.attr('id'), defaultPopulateRevealDivFunc);
},
showExpandedInfoASAP = debounce(showExpandedInfo, 50, false),
showExpandedInfoLater = debounce(showExpandedInfo, 500, false),
setSelectedElement = function (element, asap) {
var listElem,
......@@ -98,11 +101,13 @@
if (sessionStorage !== undefined && settings.rememberLastSelected) {
sessionStorage[sessionStorageKey] = listElem.attr('id');
}
if (asap) {
debounce(showExpandedInfo, 50, false)();
showExpandedInfoASAP();
} else {
debounce(showExpandedInfo, 500, false)();
showExpandedInfoLater();
}
} else {
$('#' + settings.itemInfoDivId).hide();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment