Hi all:
Can you explain what the following selector mean?
$("input:checkbox.compbox")
Thank you.
Hi all:
Can you explain what the following selector mean?
$("input:checkbox.compbox")
Thank you.
It's looking for elements like this:
<input type="checkbox" class="compbox" />
It's looking for three things:
<input />type="checkbox" inputcompboxSince the selector has no spaces, it's look for individual elements that meets all three criteria, not children/descendants or anything like that. For additional info, you can find a full list of selectors here, a great getting started guide here and a video tutorial on selectors here.