Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

js add class when hover

<script>
  $(document).ready(function () {
    $(".box").hover(
      function () {
        $(this).addClass("box-hover");
      },
      function () {
        $(this).removeClass("box-hover");
      }
    );
  });
</script>
 
PREVIOUS NEXT
Tagged: #js #add #class #hover
ADD COMMENT
Topic
Name
9+2 =