yui button vs standard html <button>
i am trying to understand when should yui push button be used instead of just standard <html> button. example is given at yui site:
If I just have a button on click of which I should do some calculation, should i use standard <button>, attach event handler to it or should i create a new button using yui button constructor first and then handler?
var oPushButton1 = new YAHOO.widget.Button("pushbutton1");
there is existing code that i have inherited for maintainence and in some plces, button is being instantiated using yui constructor and at other places, only <button> is being used.I am confused between when to use what.
thanks in advance.
YUI button is simply wrapper around button that add some functionalities, there is no way to say which one should be used when it's your choice.
a regular button clicks just fine. if it were a slider or progress bar something, yui is worth considering. but a button? just use html.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)