jquery advace

   // cache this query since it's a search by CLASS
   selectable = $(":checked.selectable");
   // when the select/deselect all is clicked, do this function
   // whenever any individual checkbox is checked, change the text
   // describing how many are checked
   // calculate how many are initially checked
var selectable;
function changeNumFilters()
   // this needs to be checked on every call
   // since the length can change with every click
   var size = $(":checked.selectable").length;
   if (size > 0)
// handles the select/deselect of all checkboxes
function selectAll()
   var checked = $("#selectall").attr("checked");
      var subChecked = $(this).attr("checked");
      if (subChecked != checked)


Also in JavaScript: