Prevent plugin from loading twice
Currently, I am using smth like this:
if($("." + pluginName + "-container").length)
{
return;
}
else
{
globals.container = $('<div class="' + pluginName + '-container" id="plugincontainer"></div>').appendTo(pluginContainer);
globals.container.append(
...
But this only prevents loading the content and not stops the plugin from loading at all. Is there a way to do this?