Thursday, October 17, 2013
A simple and easy way to make your JQuery plugin work in an AMD and NON-AMD context is the following snippet. See how it cleverly uses the factory.
I found the following code example on JQuery's architecture and found it very helpful. One thing to note is the great use of ensuring JQuery is always called with a new instance. Relevant snippet is the following: