change jquery mobile color swatch dynamically

后端 未结 7 1097
隐瞒了意图╮
隐瞒了意图╮ 2020-12-17 18:13

I want to change a jquery-mobile buttons color swatch dynamically with javascript, but I can\'t\' find a way (except removing and adding all classes and event handlers, but

相关标签:
7条回答
  • 2020-12-17 18:49

    If the button is defined as:

    <button type="button" id="yourbutton">Hello</button>
    

    Then this works the fastest:

    $('#yourbutton').parent().find('.ui-btn-inner').css("background-color",yournewcolor);
    
    0 讨论(0)
提交回复
热议问题