Guest User

Untitled

a guest
Apr 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <input type="checkbox" id="bob" />
  2. var checkbox = $("#bob").click(function() { //some code } )
  3.  
  4. if ( checkbox.eq(0).SomeMethodToGetARealDomElement().checked )
  5. //do something.
  6.  
  7. if ( checkbox.eq(0).is(":checked"))
  8. //do something
  9.  
  10. $("table").get(0);
  11.  
  12. $("table")[0];
  13.  
  14. $(":checkbox").click(function() {
  15. if ($(this).is(":checked")) {
  16. // do stuff
  17. }
  18. });
  19.  
  20. $(":checkbox").each(function(n, i) {
  21. $(n).data("index", i);
  22. });
  23. $(":checkbox").click(function() {
  24. if ($(this).is(":checked") && $(this).data("index") == 0) {
  25. // do stuff
  26. }
  27. });
  28.  
  29. $(this).attr("checked") ? $(this).val() : 0
  30.  
  31. $('#element').get(0);
  32.  
  33. $('a').get(0)
Add Comment
Please, Sign In to add comment