Hi,
Can you help turn the following Javascript to jQuery equivalent?
// Let's use a lowercase function name to keep with JavaScript conventions
function selectAll(involker) {
// Since ASP.NET checkboxes are really HTML input elements
// let's get all the inputs
var inputElements = document.getElementsByTagName('input');
for (var i = 0; i < inputElements.length; i++) {
var myElement = inputElements[i];
// Filter through the input types looking for checkboxes
if (myElement.type === "checkbox") {
// Use the involker (our calling element) as the reference
// for our checkbox status
myElement.checked = involker.checked;
}
}
}
It's from here http://wiki.asp.net/page.aspx/281/check-uncheck-checkboxes-in-gridview-using-javascript/