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