TAU setNSData do not work…

TAU setNSData do not work…

BY 23 Nov 2014 Web Application Development

I want to change button’s Icon to top.. and make code two ways… 

jQuery Code do work good.. but tau setNSData do not work…

jQuery Code 

        $(“#button1”).button(“option”, “iconpos”, “top”);
        $(“#button1”).button(“refresh”);

TAU Code 

        var button1Element = document.getElementById(“button1”);
        var button1 = tau.widget.Button(button1Element);

        tau.util.DOM.setNSData( button1Element, “iconpos”, “top” );  // or (tau.util.DOM.setAttribute( button1Element, “data-iconpos”, “top” );

        button1.refresh();

There is no script error!!.. but  jQuery can move  Icon to top. but Tau can’t do it..

I debug it and i find the button1’s attribute’ change works good.. but button1’s class’ is not changed…   what is tau’s formal way?

 

Anyone who know…

 

Thanks..

 

Written by