target:nth-child(n)
يسمح لك CSS بتحديد كل العناصر nth مع الفئة المستهدفة أو نوع العنصر. في ما يلي كيفية إعطاء العنصر الثالث في كل فئة من فئات الارتداد: $(".target:nth-child(3)").addClass("animated bounce");
اجعل الطفل الثاني في كل عنصر من عناصرك ترتد. يجب عليك تحديد عناصر العناصر مع الفئة target
. target
elements should bounce.");'
- text: فقط اثنان عناصر سوفت ارتدت.
testString: 'assert($(".animated.bounce").length === 2, "Only two elements should bounce.");'
- text: 'يجب استخدام محدد :nth-child()
لتعديل هذه العناصر.'
testString: 'assert(code.match(/\:nth-child\(/g), "You should use the :nth-child()
selector to modify these elements.");'
- text: ''
testString: 'assert(code.match(/\$\(".target:nth-child\(2\)"\)/g) || code.match(/\$\(".target:nth-child\(2\)"\)/g) || code.match(/\$\(".target"\).filter\(":nth-child\(2\)"\)/g) || code.match(/\$\(".target"\).filter\(":nth-child\(2\)"\)/g), "Only use jQuery to add these classes to the element.");'
```