jquery/jquery-mobile — pull request #3578 by gabrielschulhof (2012-02-15 07:40:26+00:00)
Title: [buttonMarkup] Remember applied classes so as to unapply only those at t...

...he next call

Also fixes another bug:

In the functional test, perform these steps:

1. Set icon to "arrow-r" and inline to true - apply these two.
2. Set shadow to false and apply this one.
3. Set icon to "arrow-r" and apply this one.

At this point, the <a>-based button gets a shadow, whereas the other two do not. I found that this is because at the top, where the options are merged, el.jqmData("shadow") returns true even though I have set .attr("data-" + $.mobile.ns + "shadow", false) ... the fix is to also set el.jqmData(key, value) for all resulting options.