Update to buttonMarkup to use appropriate data selector

This commit is contained in:
Josh Dean 2012-01-18 19:40:50 -06:00 committed by Ghislain Seguin
parent 87db1cf5de
commit 57ac32ffc6

View file

@ -30,8 +30,8 @@ $.fn.buttonMarkup = function( options ) {
buttonIcon = o.icon ? document.createElement( "span" ) : null;
// if so, prevent double enhancement, and continue with rest of the elements.
if( e.tagName === "INPUT" && e.getAttribute( "data-role" ) === "button" ) continue;
if( e.tagName === "INPUT" && el.jqmData('role') === "button" ) continue;
// if this is a button, check if it's been enhanced and, if not, use the right function
if( e.tagName === "BUTTON" ) {
if ( !$( e.parentNode ).hasClass( "ui-btn" ) ) $( e ).button();