开发者

Javascript loaders with jQuery

开发者 https://www.devze.com 2023-02-24 08:36 出处:网络
I\'m interested in using a Javascript loader and want to use one which plays nicely with jQuery.I found this comparison table: https://spreadsheets.google.com/lv?key=tDdcrv9wNQRCNCRCflWxhYQ

I'm interested in using a Javascript loader and want to use one which plays nicely with jQuery. I found this comparison table: https://spreadsheets.google.com/lv?key=tDdcrv9wNQRCNCRCflWxhYQ

However, I'd like to get a recommendation from someone with experience with using any of these with jQuery and jQuery UI.

Edit:

The two primary concerns with mixing jQuery and JS loaders are as follows:

  • Will there be a namespace conflict?
  • Will there be any unexpected behavior?

For namespaces, jQuery's documentation covers this extensively.

For unexpected behavior, something you might run into is that the DOM is already in the ready state before jQuery gets loaded in, causing your $(document).ready(handler)s to not fire. You can avoid this by just not using them and assuming your DOM is ready.

If I'm missing others, please co开发者_StackOverflow社区mment.

Resources

http://www.nczonline.net/blog/2009/07/28/the-best-way-to-load-external-javascript/


In my humble opinion, YUI 3 has the best architecture of any JS framework out there. Their dependency management and dynamic script loading is, therefore, my favorite. I do love jQuery's simplicity and great community so I've used the two together without too much trouble:

Mixing jQuery and YUI together in an app, is it easily possible?

0

精彩评论

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

关注公众号