課程
/前端開發
/jQuery
/jQuery基礎 (一)—樣式篇
$(this).next().addClass(className); // 這句話中的 className參數 是怎么傳進去的 ?
2016-05-10
源自:jQuery基礎 (一)—樣式篇 3-5
正在回答
在ccs樣式表中寫相關樣式,然后把樣式的名字傳過去。
ex:.red{color:red;},$(this).next().addClass(.red);
微積分2016 提問者
問題已解決
參數列表:
參數 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? 描述 ? ?
function(index,oldclass) ? ?方法返回一個或多個空格分隔的要被移除的class名。 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? index - 可選,接受選擇器的index 位置。 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? oldclass - 可選,接受選擇器的原有類值。 ??
舉報
jQuery初入開啟樣式修煉,體驗萬能的jQuery樣式集搭建網站布局
4 回答jQuery樣式刪除方法removeClass(function(index,class))參數問題。
1 回答jQuery樣式刪除方法removeClass(function(index,class))返回值問題。
1 回答jquery屬性樣式方法
2 回答樣式操作.css()
2 回答jQuery方法
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-05-10
在ccs樣式表中寫相關樣式,然后把樣式的名字傳過去。
ex:.red{color:red;},$(this).next().addClass(.red);
2016-05-10
問題已解決
參數列表:
參數 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? 描述 ? ?
function(index,oldclass) ? ?方法返回一個或多個空格分隔的要被移除的class名。
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? index - 可選,接受選擇器的index 位置。
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? oldclass - 可選,接受選擇器的原有類值。 ??