gremofedrot
New Member
I have bumped with odd behaviour. I have set of checkbox input. On itself the following code works ok. But if integrate it into website when you press All button nothing happen \[code\] $("[name*=group_]").live('click', function(){ var id = $(this).attr('name').substr(6,1); var cnt = $("[value!='all'][name*=group_"+id+"]:checked").length; if(cnt > 0){ $("[value='http://stackoverflow.com/questions/13877060/all'][name*=group_"+id+"]").removeAttr('checked'); } else { $("[value='http://stackoverflow.com/questions/13877060/all'][name*=group_"+id+"]").attr('checked', 'checked'); } })<fieldset class="subject"> <input type="checkbox" value="http://stackoverflow.com/questions/13877060/all" name="group_4" id="group_4"><label title="All" for="all">All</label> <input type="checkbox" value="http://stackoverflow.com/questions/13877060/15" id="cat_15" name="group_4[]"><label title="Maths" for="cat_15">Maths</label> <input type="checkbox" value="http://stackoverflow.com/questions/13877060/16" id="cat_16" name="group_4[]"><label title="English" for="cat_16">English</label> <input type="checkbox" value="http://stackoverflow.com/questions/13877060/14" id="cat_14" name="group_4[]"><label title="Science" for="cat_14">Science</label> </fieldset>\[/code\]Please go there http://jsfiddle.net/XXQTT/1/ and try it with \[code\]Applicability\[/code\]. When you click ex:\[code\]Early Years\[/code\] it works but then if you click on \[code\]All\[/code\] - nothing. I suppose its because of css but can't figure out how and how to make it work