--- id: bad87fee1348bd9aedc08826 title: Target Elements by Class Using jQuery required: - link: 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.0/animate.css' challengeType: 6 videoUrl: '' localeTitle: '' --- ## Description
ترى كيف يمكننا جعل كل من لديك button عناصر ترتد؟ لقد اخترناها بـ $("button") ، ثم أضفنا بعض فئات CSS إليها باستخدام .addClass("animated bounce"); . لقد استخدمت للتو وظيفة .addClass() jQuery's ، والتي تسمح لك بإضافة فئات إلى العناصر. أولاً ، دعنا نستهدف عناصر div مع الفصل well باستخدام محدد $(".well") . لاحظ أنه مثلما هو الحال مع إعلانات CSS ، فإنك تكتب a . قبل اسم الفصل. ثم استخدم مسج ل .addClass() وظيفة لإضافة فئات animated و shake . على سبيل المثال ، يمكنك جعل جميع العناصر ذات اهتزاز text-primary عن طريق إضافة ما يلي إلى document ready function : $(".text-primary").addClass("animated shake");
## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert($(".well").hasClass("animated") && $(".well").hasClass("shake"), "Use the jQuery addClass() function to give the classes animated and shake to all your elements with the class well.");' - text: استخدم jQuery فقط لإضافة هذه الفئات إلى العنصر. testString: 'assert(!code.match(/class\.\*animated/g), "Only use jQuery to add these classes to the element.");' ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

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