I just switched from YUI2 to YUI3. So instead of using, YAHOO.util.Dom.get(ID_OF_ELEMENT)I tried to use Y.one('#ID_OF_ELEMENT)'. It works fine for div with id img123 , but not with 123img or 123 .
I also tried using Y.all, but that didn't work. The only way I worked when using YUI was to use Y.DOM.byId(shown as an alternative in the YUI forum ).
So, I did to grab the element with the latter and first get the Node, for example:
Y.one(Y.DOM.byId(ID_OF_ELEMENT)).append(SOME_HTML_CONTENT);
I could not use it only Y.DOM.byIdbecause I needed to manipulate content like Node.
So, is there a way to do this using only Y.one? Is this a YUI error?
I made a comment on this page of the YUI forum , since I do not know if this is really a mistake that I could fill in with the YUI Error Reporting Tool .
source
share