Someone
public javascript v1 · immutable // Select all checkboxes within a range function selectRange(from, to) { // Traverse through the sibling nodes for (var i = from.nextSibling; i; i = i.nextSibling) { alert('hi') // Make sure that we're only dealing with elements if (i.nodeType != 1) continue; // If we find a match then we need to stop if (to.nodeType) { if (i == to) break; } else if (jQuery.filter(to, [i]).r.length) break; i.addClass('selected'); } }