JQuery Widget Factory: Call public method on all instances -
assuming have widget named foo , bind multiple dom elements , call public method of widget first created instance fire method.
var instances = $('div').foo(); // instantiate plugin on every div instances.foo('hello'); // calls public method hello on first instance
is design? expectation hello method fired every instance.
Comments
Post a Comment