Changing the value of a jQuery mobile button using jQuery

前端 未结 7 1546
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 04:49

Wondering if you can help me out. I seem to have a problem changing the text of my jQuery Mobile buttons with jQuery.

$(\"#myButton .ui-btn-text\").text(\"New te         


        
7条回答
  •  眼角桃花
    2021-02-05 05:10

    Updated the following works for me (similar to the answer from kovač):

    $('#MyButton').html('changed value').button('refresh');
    

    or

    $("#MyButton").val("changed value").button("refresh");
    

提交回复
热议问题