[jQuery] Re: Right way to write a function

2008-05-14 Thread Maximiliano Kraszewski
It works! Thank you so much! 2008/5/9 Hamish Campbell [EMAIL PROTECTED]: Hi there, A quick fix is to modify your extension to: jQuery.fn.toggleActive = function(){ $('#iconBox ul.bar li').children(a).removeClass(active); $(this).addClass(active); }; You would then call

[jQuery] Re: Right way to write a function

2008-05-09 Thread Hamish Campbell
Hi there, A quick fix is to modify your extension to: jQuery.fn.toggleActive = function(){ $('#iconBox ul.bar li').children(a).removeClass(active); $(this).addClass(active); }; You would then call by: $('#page2').click(function() { ($(this).children(a).toggleActive();