Code:
 
jQuery.fn.checkBoxTableHighlighter = function(){
 return this.each(function() {  
  var $obj = $(this);
  var jsObj = this; 
  var $table = $("tr > td", this);
 alert($table.attr("tag")); //coming up as undefined 
  if(jsObj.tagName.toLowerCase() == "input" && jsObj.type.toLowerCase() == "checkbox"){
   //actions on check box
  }
  else if(jsObj.tagName.toLowerCase() == "table"){
   //actions on table
 
   //on page load, highlight rows for a table that has a specified selector
      $obj.children().filter(':has(:checkbox:checked)').closest("tr").addClass(defaults.highlightClass);
      //on page load, remove high light for the check boxes that are not checked
      $obj.children().filter(':has(:checkbox:not:checked)').closest("tr").removeClass(defaults.highlightClass);
      //check box clicked with the specified table css selector
      $obj.children().filter(':has(:checkbox)').click(function (e) { 
       highlight.CheckBoxRowSelect(e, $(this));
      });
      //check box keyup with the specified table css selector
      $obj.children().filter(':has(:checkbox)').keyup(function (e) {
          highlight.CheckBoxRowSelect(e, $(this));
      });
  }
 
 
 
 
 });
};
call:
Code:
$(".someItem").checkBoxTableHighlighter();
When the check box is checked (onload, click or keyup), if the table has a specified selector then i want to change the background color. I already have a working sample that i am converting to plugin. Since, my selector is at the table level, how can i find the checkboxes that are inside tr and td?