I am using interact.js from here: enter link description here
The site where I am using it will be load over the Navigation ajax. The Problem here is, if the client click x times of the Navigation the interact.js will be loaded and loaded again. Normaly is shouldn´t be a problem, but I need to be sure the interact.js just load once.
You can just put an if(typeof interact === 'undefined')
before your call to the loading function. So if interact is loaded, the call will not be executed. Unfortunately you can't determine, if the loading process is still running. So while loading the process would be started a second time.