[jQuery] Re: Optimization Help

2007-08-20 Thread TigeRyan
Fantastic solution, really cut the code down! Thank you very much! On Aug 18, 8:59 am, Pops <[EMAIL PROTECTED]> wrote: > How about just: > > $('[EMAIL PROTECTED]').click(function() { >if (this.id == "categoryid0") { > $('[EMAIL PROTECTED]').attr("checked",""); > this.checked = tr

[jQuery] Re: Optimization Help

2007-08-18 Thread Pops
How about just: $('[EMAIL PROTECTED]').click(function() { if (this.id == "categoryid0") { $('[EMAIL PROTECTED]').attr("checked",""); this.checked = true; } else { $('input#categoryid0').attr("checked",""); } }); Basically, by the time the click handler is caledl, the G

[jQuery] Re: Optimization Help

2007-08-17 Thread Glen Lipka
I whipped up a demo. http://www.commadot.com/jquery/forms/all.htm var regularBoxes = $("[EMAIL PROTECTED]").not("#allToggle"); $("#allToggle").click(function(){ if ($("#allToggle").attr("checked") == true) { regularBoxes.removeAttr("checked"); } }); regularBoxes.click(funct

[jQuery] Re: optimization help

2007-06-11 Thread Gordon
No ideas? On Jun 11, 11:01 am, Gordon <[EMAIL PROTECTED]> wrote: > I am currently working through a script that at the moment works just > fine but where there are some performance bottlenecks that I am trying > to reduce. It works with acceptible speed when dealing with 40 or so > elements but

[jQuery] Re: optimization help

2007-06-11 Thread Gordon
Actually, forget that, it doesn't work, it just no longer throws a javascript error :) On Jun 11, 12:21 pm, Gordon <[EMAIL PROTECTED]> wrote: > I tried the following: > > self.handleRange= function (rule) > { > valFields = $(rule.valField); >

[jQuery] Re: optimization help

2007-06-11 Thread Gordon
I tried the following: self.handleRange= function (rule) { valFields = $(rule.valField); if (!(minVal = parseInt ($(rule.minField).val (), 10))) {minVal = 0}; if (!(maxVal = parseInt ($(rule.maxField).val (), 10))) {m