You can do that in Javascript: Anonymous Methods

12 August 2008 by Sean, No Comments

So found out yesterday that anonymous methods exist in javascript. Who knew?

 divToAdd.onmouseover = function() { picker.changeStyles(divToAdd, true); };

Where picker.changeStyles is a method on a class. Javascript is starting to grow on me.

Related Posts

Leave a Reply