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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -