Waiting until jQuery and or other library loaded
This is the routine I use when the framework at use doesn't provide dependency loading or if there is no framework
var runWhenAvailable = function()
{
if (typeof jQuery === "undefined" || typeof jQuery.fn.hvTooltip === "undefined")
{
// console.log("runWhenAvailable retrying");
setTimeout(runWhenAvailable, 20);
return;
}
$("#pcs-tooltip").hvTooltip({template: "divHoverTemplateMinWidth", positionReference: "bottom"});
};
setTimeout(runWhenAvailable, 10);
Recent Comments