Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[buttonMarkup] Do not assume that a button's className will contain o…

…nly classes assigned by buttonMarkup()
  • Loading branch information...
commit 268b9e928dca48325a69bb7383a3a08198525256 1 parent bb49223
@gabrielschulhof gabrielschulhof authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/jquery.mobile.buttonMarkup.js
View
5 js/jquery.mobile.buttonMarkup.js
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.