0
我創建了一個風格改變背景顏色按鈕上飛jQuery Mobile的
.someRedStuff
{
background:red !important;
}
我想星形圖標的顏色變爲紅色按鈕被點擊時
<a data-role="button" data-iconpos= "notext" data-icon="star" id="custom-li-3" onclick="changeColor()"></a>
我想這個代碼,但它似乎並沒有做的伎倆..
function changeColor()
{
$('#custom - li - 3').removeClass('ui-icon-star').addClass('someRedStuff');
}
如何改變S的顏色點擊焦油圖標?
jQuery Mobile的最有可能修改標籤(添加額外的HTML)在運行時。 – Coby