Files
The Coding Aviator 48312b3ff9 fix(guide): Fix language names in jQuery section of guide (#35271)
* Fix language names

* Fix language name

* Update index.md

* Fix language names

* Change javascript to js
2019-03-01 12:33:52 -08:00

553 B

title
title
Target the Same Element with Multiple jQuery Selectors

Target the Same Element with Multiple jQuery Selectors

Solution

<script>
  $(document).ready(function() {
    $("button").addClass("animated"); // Target elements with type "button" and add the class "animated" to them.
    $(".btn").addClass("shake"); // Target elements with class ".btn" and add the class "shake" to them.
    $("#target1").addClass("btn-primary"); // Target elements with id "#target1" and add the class "btn-primary" to them.
  });
</script>