jQuery bind() mouseover, mouseout

Description

jQuery bind() mouseover, mouseout

View in separate window

<!DOCTYPE html>
<html>
<head>
<script 
 src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>/*w  ww.  j  av  a 2  s .co  m*/
<script>
$(document).ready(function(){
  $("p").bind("mouseover mouseout", function(){
    $("p").toggleClass("intro");
  });
});
</script>
<style>
.intro {
  font-size: 150%;
  color: red;
}
</style>
</head>
<body>

<p>Hover the mouse pointer over this paragraph.</p>

</body>
</html>



PreviousNext

Related