Q:

Change the color of any paragraph to red on mouseover event using jquery

0

Change the color of any paragraph to red on mouseover event using jquery

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

HTML Code :

<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Change the color of any paragraph to red on mouseover event.</title>
</head>
<body>
<p>jQuery Exercises, Practice and Solution.</p>
<p>Ajax Tutorial</p>
</body>
</html>

CSS Code :

p {
color: blue;
font-size: 24px
}

JavaScript Code :

$( "p" ).on( "mouseover", function() {
$( this ).css( "color", "red" );
});

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now