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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -