Skip to content

Instantly share code, notes, and snippets.

@mynameispj
Created October 17, 2012 20:50
Show Gist options
  • Save mynameispj/3908091 to your computer and use it in GitHub Desktop.
Save mynameispj/3908091 to your computer and use it in GitHub Desktop.
jQuery - check if element has another element
$('#div').has('.other-div').length;
//returns 1 if it does, returns 0 if it doesn't
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment