Created
July 27, 2009 16:13
-
-
Save tjp/156578 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<div id="wrapper"> | |
<h1>context menu widget w/ menu plugin</h1> | |
<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== --> | |
<div id="delegate" style="background: #ffeb88;"> | |
<div>first div</div> | |
<span>span confuses the universe</span> | |
<div>second div</div> | |
<div>third div</div> | |
<div>fourth div</div> | |
</div> | |
</div> | |
<script type="text/javascript"> | |
YUI({ | |
base: 'js/yui3/build/', | |
filter: 'raw' | |
}).use("node", "selector-css3", function(Y) { | |
alert(Y.get('#delegate div:nth-of-type(2)').get('innerHTML')); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment