Last active
August 29, 2015 14:01
-
-
Save segovia94/50c8488c014423142aa3 to your computer and use it in GitHub Desktop.
Toggle all checkboxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//requires jQuery 1.6 minimum | |
var $checkBoxes = $('input:checkbox'); | |
$checkBoxes.prop("checked", !$checkBoxes.prop("checked")); | |
//bookmarklet created via: http://benalman.com/code/test/jquery-run-code-bookmarklet/ | |
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.6",function($,L){var%20$checkBoxes=$("input:checkbox");$checkBoxes.prop("checked",!$checkBoxes.prop("checked"));}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment