2012-04-10 25 views

回答

15

jQuery Mobile進入並更改您的HTML以使所有內容按預期工作。因此,當您更改按鈕內部的時間時,您正在取消jQuery Mobile爲您提供的內容。

最簡單的可能變化,你可以做會從「#svbutton」您的選擇更改爲以下線的時候你去更新按鈕文本(fiddler here):

$('#svbutton .ui-btn-text').text(currentTimeString); 

你應該多讀了關於jQuery Mobile如何工作和how to use it dynamically on their documentation page on Page Scripting