children
هذا العنصر. على سبيل المثال ، عناصر الزر في هذا التحدي بالنص "# target1" و "# target2" و "# target3" كلها children
من عنصر <div class="well" id="left-well">
. jQuery لديه وظيفة تسمى children()
تسمح لك بالوصول إلى أطفال أي عنصر قمت بتحديده. في ما يلي مثال على كيفية استخدامك الدالة children()
لمنح أطفال عنصر left-well
اللون blue
: $("#left-well").children().css("color", "blue")
right-well
اللون باللون البرتقالي. #right-well
نص برتقالي.'
testString: 'assert($("#right-well").children().css("color") === "rgb(255, 165, 0)", "All children of #right-well
should have orange text.");'
- text: ''
testString: 'assert(code.match(/\.children\(\)\.css/g), "You should use the children()
function to modify these elements.");'
- text: استخدم jQuery فقط لإضافة هذه الفئات إلى العنصر.
testString: 'assert(code.match(/