想使用next給class=level-2的ul的所有第一個(gè)元素添加文本框
$("button:first").click(function()?{???????? ????$('.level-1').next(":first-child").css('border',?'1px?solid?red')??? ?})
這個(gè)代碼無效,請(qǐng)問該如何寫
$("button:first").click(function()?{???????? ????$('.level-1').next(":first-child").css('border',?'1px?solid?red')??? ?})
這個(gè)代碼無效,請(qǐng)問該如何寫
2019-02-13
舉報(bào)
2019-02-15
$(
'.level-2'
).next(
":first"
).css(
'border'
,?
'1px?solid?red'
)?
2019-03-17
本節(jié)代碼中 ul 并沒有同輩元素,所以不能用 next 來操作哦!