Search code examples
yui

Select html element in yui


How can I select html element or div by Id using yui , How can I migrate the following code from Jquery to YUI

jQuery("#resultTable").text("");

Where resulttable is a div.

Thanks.


Solution

  • There's a nice table comparing YUI3 and jQuery here: http://jsrosettastone.com/

    As you can see, it looks very similar:

    // jQuery
    jQuery('#resultTable').text('');
    
    // YUI
    Y.one('#resultTable').set('text', '');