--- id: bad87fee1348bd9aed108826 title: Target a Specific Child of an Element Using jQuery required: - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.0/animate.css' challengeType: 6 videoUrl: '' localeTitle: استهداف طفل معين من عنصر باستخدام jQuery --- ## Description
لقد رأيت لماذا تكون سمات المعرفات ملائمة للغاية للاستهداف باستخدام محددات jQuery. ولكنك لن تمتلك دائمًا معرفات نظيفة. لحسن الحظ ، jQuery لديه بعض الحيل الأخرى لاستهداف العناصر الصحيحة. يستخدم jQuery محددات CSS لاستهداف العناصر. target:nth-child(n) يسمح لك CSS بتحديد كل العناصر nth مع الفئة المستهدفة أو نوع العنصر. في ما يلي كيفية إعطاء العنصر الثالث في كل فئة من فئات الارتداد: $(".target:nth-child(3)").addClass("animated bounce"); اجعل الطفل الثاني في كل عنصر من عناصرك ترتد. يجب عليك تحديد عناصر العناصر مع الفئة target .
## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert($(".target:nth-child(2)").hasClass("animated") && $(".target:nth-child(2)").hasClass("bounce"), "The second element in your 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.");' ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

```
## Solution
```js // solution required ```