Thanks.! will try that Regards, Kai
> Date: Sat, 1 Nov 2008 18:07:18 +1100 > From: [EMAIL PROTECTED] > To: jquery-en@googlegroups.com > Subject: [jQuery] Re: Unresponsive script when navigating away > > > Oh and ":checkbox" is a "shortcut" for "input[type=checkbox]". > > Karl Rudd > > On Sat, Nov 1, 2008 at 6:05 PM, Karl Rudd <[EMAIL PROTECTED]> wrote: > > Instead of doing the search each time, cache the selected objects. > > > > <script type="text/javascript"> > > $(document).ready(function (){ > > var checkboxes = $('div[name=limit1] label > > input[type=checkbox]'); > > checkboxes.bind('click',function(){ > > checkboxes.each(function(){ > > this.checked = ""; > > }); > > this.checked = "checked"; > > }); > > }); > > </script> > > > > Karl Rudd > > > > On Thu, Oct 30, 2008 at 2:59 PM, bugpanye <[EMAIL PROTECTED]> wrote: > >> > >> > >> <script type="text/javascript"> > >> $(document).ready(function (){ > >> $('div[name=limit1] label > >> input[type=checkbox]').bind('click',function(){ > >> $('div[name=limit1] label > >> input[type=checkbox]:checked').each(function(){ > >> this.checked = ""; > >> }); > >> this.checked = "checked"; > >> }); > >> }); > >> </script> > >> > >> hi all, > >> > >> the code above i use to make a list of checkbox limited to one selection at > >> a time, my trouble is that now i have over 100+ checkboxes, the script > >> becomes extremely sluggish and gives me the Unresponsive script warning > >> when > >> i reload the page.. > >> > >> is there anyway to speed up this script?:super: > >> > >> ----- > >> bugpanye-backpacks > >> http://www.e-packs.com healthy backpacks for all > >> -- > >> View this message in context: > >> http://www.nabble.com/Unresponsive-script-when-navigating-away-tp20240183s27240p20240183.html > >> Sent from the jQuery General Discussion mailing list archive at Nabble.com. > >> > >> > > _________________________________________________________________ Manage multiple email accounts with Windows Live Mail effortlessly. http://www.get.live.com/wl/all