weixin_33682719 2017-07-03 09:57
浏览 51

一次加载interact.js

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.

  • 写回答

1条回答 默认 最新

  • weixin_33676492 2017-07-03 10:19
    关注

    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.

    评论

报告相同问题?