I've multiple checkboxes of different type on my html like

<div class="category_A">
<input type="checkbox"> a1
<input type="checkbox"> a2
<input type="checkbox"> a3
<input type="checkbox"> a4
</div>

<div class="category_B">
<input type="checkbox"> b1
<input type="checkbox"> b2
<input type="checkbox"> b3
<input type="checkbox"> b4
.....
</div>

<div class="category_C">
<input type="checkbox"> c1
<input type="checkbox"> c2
<input type="checkbox"> c3
<input type="checkbox"> c4
.....
</div>


I'm creating common  object for all of this checkbox object like 
var $checkBoxObject = $("[EMAIL PROTECTED] ^= 'category_'] [EMAIL 
PROTECTED]'checkbox']");
checkBoxObject = $checkBoxObject[0];


and then later I'm using click function on this common object as 
$checkBoxObject.click(
function()
{
 
}

).attr("checked",true);

This worked but what's troubling me is the initialization part(shown in
bold) is taking 0.8 secs for 130 checkboxes. 

Can any one of jquery pros tell me whats other efficient way of
initialization which completes in <0.3 secs...

Any straight help is appreciated..
-- 
View this message in context: 
http://www.nabble.com/is-there-any-way-to-create-common-object-for-all-checkboxes--tf4496645s15494.html#a12823101
Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to