I can't seem to change the theme of a button or split button (on a listview). Here is my code:
Using SetProblemButton(true) does make a change, though only the background, no the icon.
Afterward, SetProblemButton(false) does absolutely nothing
function SetProblemButton(bl){
if(bl){
$('#problem').attr('data-theme', 'e').removeClass('ui-body-a').addClass('ui-body-e').trigger('create');
}else{
$('#problem').attr('data-theme', 'a').removeClass('ui-body-e').addClass('ui-body-a').trigger('create');
}
}
<ul id="currentItemViewer" data-role="listview" data-inset="true" data-split-icon="alert">
<li data-icon="alert" data-role="list-divider" data-theme="b">
<a id="m_container"></a>
<a id="problem" href="#" data-theme="a"></a>
</li>
<li id="text_container" data-theme="d" ></li>
</ul>
Surely there is a better way to just change the theme of an item and then refresh it?