Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="checkbox" id="bob" />
- var checkbox = $("#bob").click(function() { //some code } )
- if ( checkbox.eq(0).SomeMethodToGetARealDomElement().checked )
- //do something.
- if ( checkbox.eq(0).is(":checked"))
- //do something
- $("table").get(0);
- $("table")[0];
- $(":checkbox").click(function() {
- if ($(this).is(":checked")) {
- // do stuff
- }
- });
- $(":checkbox").each(function(n, i) {
- $(n).data("index", i);
- });
- $(":checkbox").click(function() {
- if ($(this).is(":checked") && $(this).data("index") == 0) {
- // do stuff
- }
- });
- $(this).attr("checked") ? $(this).val() : 0
- $('#element').get(0);
- $('a').get(0)
Add Comment
Please, Sign In to add comment