Created
February 14, 2011 17:39
-
-
Save jamischarles/826226 to your computer and use it in GitHub Desktop.
YUI: pass in raw node OR id in YUI 3
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
var getNode = function(el) { | |
//fetch the node by selector, or wrap it in a new YUI Node instance | |
return Y.one('#' + el) || new Y.Node(el); | |
}; | |
//from http://stackoverflow.com/questions/4892051/how-can-i-normalise-a-javascript-object-to-a-dom-element-with-yui3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment