[jQuery] Re: jQuery script simplification question

2009-04-17 Thread Calvin Stephens
Hi Richard, Thanks for taking time out of your schedule to help me learn how to write simplified code! Cheers, Calvin On Thu, Apr 16, 2009 at 9:47 PM, Richard D. Worth wrote: > You only need one document.ready, and there's a shorthand: > > $(function() { > >   $("li.one").click(function() {

[jQuery] Re: jQuery script simplification question

2009-04-16 Thread Richard D. Worth
You only need one document.ready, and there's a shorthand: $(function() { $("li.one").click(function() { $("div.a").toggle("highlight", {}, 1000); }); $("li.two").click(function() { $("div.b").toggle("highlight", {}, 1000); }); $("li.three").click(function() { $("div.c").tog