4
我試圖動態地添加一個跨度到一個醇,其中計數器應該是字母。例如: 一個結果 乙結果 C測試結果 等等等等使用字母(jQuery)增量OL
我有了這個代碼,這是偉大的使用電話號碼,但我不知道該怎麼做它讓數字到字母
jQuery(document).ready(function() {
jQuery('.results ol').each(function() {
jQuery(this).find('li').each(function (i) {
i = i+1;
jQuery(this).prepend('<span class="marker">' + i + '</span>');
});
});
});
任何幫助,非常感謝!
不錯的一個。打敗了我。 – 2010-05-17 02:33:17
真棒!感謝堆 – 2010-05-17 02:35:29
不客氣!順便說一下,你需要標記26個以上的結果嗎?也只是好奇你爲什麼不只是使用CSS? '.results ol li {list-style-type:upper-alpha}'或'.results ol li {list-style-type:lower-alpha}' – Mottie 2010-05-17 02:37:53