Created
November 9, 2012 15:02
-
-
Save Macagare/4046188 to your computer and use it in GitHub Desktop.
Javascript: jquery find parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Find a parent div by id where display is none: | |
/* | |
<div id="#extended_selectors"...> | |
... | |
<span id="lorem"... /> | |
</div> | |
*/ | |
if( $(id).parents().find("#extended_selectors").css('display') == "none" ) { | |
console.log("found"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment