andru26
3/30/2017 - 9:25 PM

Check if an element is a child of another element

Check if an element is a child of another element

jQuery.fn.isChildOf = function(b){ 
  return (this.parents(b).length > 0); 
};