change jquery mobile color swatch dynamically

后端 未结 7 1094
隐瞒了意图╮
隐瞒了意图╮ 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:

    
    

    Then this works the fastest:

    $('#yourbutton').parent().find('.ui-btn-inner').css("background-color",yournewcolor);
    

提交回复
热议问题