Let's say I want to make a plain JavaScript plugin.
var myPlainJsPlugin = (function (param1,param2) {
/*code here*/
});
How do I attach this plugin, just after the document is loaded, to all elements with the class 'elmClass', without jQuery?
I am talking basically about making a plain JavaScript plugin and using it similar to using a jQuery plugin:
$('.elmClass').jQueryPlugin();
I am trying to give up jQuery for a certain project.