开发者

jquery .getScript and resource tracking

rather than use something l开发者_Python百科ike yepnope.js is there a simple method/decent plugin that can check if a resource has previously been loaded in, if not load it?

I have a number of ajax calls and should I load the same form in more than once the eventlisteners are duplicated for each load (so 4th time form is loaded 4 handlers doing same thing are called). This is because it is a web service making remote calls so I use $.getScript() to include the js I need...

I've seen jquery resource loader but wondered if there was any other options.

Thanks.


You could try using another lib for script loading, like LABjs - it has option to prevent loading same script multiple times.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜