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");
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.");'
```