Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
[buttonMarkup] Do not assume that a button's className will contain o…
Browse files Browse the repository at this point in the history
…nly classes assigned by buttonMarkup()
  • Loading branch information
Gabriel Schulhof committed Nov 5, 2012
1 parent bb49223 commit 268b9e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/jquery.mobile.buttonMarkup.js
Expand Up @@ -233,7 +233,10 @@ function updateButtonClass( $btn, classToRemove, classToAdd, hover, state ) {
var buttonElements = $.data( $btn[ 0 ], "buttonElements" );
$btn.removeClass( classToRemove ).addClass( classToAdd );
if ( buttonElements ) {
buttonElements.bcls = $btn[ 0 ].className;
buttonElements.bcls = $( document.createElement( "div" ) )
.addClass( buttonElements.bcls + " " + classToAdd )
.removeClass( classToRemove )
.attr( "class" );
if ( hover !== undefined ) {
buttonElements.hover = hover;
}
Expand Down

0 comments on commit 268b9e9

Please sign in to comment.