Using 3rd party script in jquery plugin
What is the best way to include a 3rd 开发者_开发百科party script for use in a jquery (or jquery ui) plugin?
For example, I'm writing a jQuery UI plugin that makes heavy use of dates, the in built javascript date object is not brilliant so I want to use date.js, how should I include it for use and deal with dependency issues?
As for me the simplest way just use it and describe depedency in header comment or install guide. There is no obvious/standard ways to include dependecies from JS code and IMHO you shouldn't decide for user how to check and inject dependency.
精彩评论