button
saltarem? Nós os selecionamos com $("button")
, então adicionamos algumas classes CSS a eles com .addClass("animated bounce");
. Você acabou de usar a função .addClass()
do jQuery, que permite adicionar classes aos elementos. Primeiro, vamos direcionar seus div
elementos com a classe well
, usando o $(".well")
selector. Observe que, assim como com as declarações CSS, você digita um .
antes do nome da turma. Em seguida, use a função .addClass()
do jQuery para adicionar as classes animated
e shake
. Por exemplo, você pode criar todos os elementos com a trepidação text-primary
da classe adicionando o seguinte à sua document ready function
para o document ready function
: $(".text-primary").addClass("animated shake");
addClass()
função para dar as aulas animated
e shake
a todos os seus elementos com a classe well
.
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: Use apenas o jQuery para adicionar essas classes ao elemento.
testString: 'assert(!code.match(/class\.\*animated/g), "Only use jQuery to add these classes to the element.");'
```