[jQuery] Checking checkboxes
You've been great! Thank you very much. I think I understand what's
going on.
Where did you figure out the $.Name constructs? Is this documented
anywhere?
----
Grant
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On
Behalf Of Rob D
Sent: Thursday, August 31, 2006 4:39 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Checking checkboxes
Grant,
If you wanted to you could also simply do it this way:
<script type="text/javascript">
$(document).ready(function(){
$("[@name='removeAll']").click(function() {
var x = this.checked;
$("[@name='remove[]']").each(function() {
this.checked = x;
});
});
});
</script>
I functionalised it so I could use it on a number of pages, without
writing the same code over and over.
I hope I have been of some assistance to you, I am very new to jQuery
and Javascript in general myself.
Rob
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/