Q:

Using jQuery click the button to animate the paragraph element with a number of different properties

0

Using jQuery click the button to animate the paragraph element with a number of different properties

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>Click the button to animate the paragraph element with a number of different properties.</title>
</head>
<body>
<p id="pid">jQuery</p>
<button id="button1">Click to see the animation</button>
</body>
</html>

CSS Code:

button {
    display: block;
    margin: 20px 0 0 0;
    }  

p {
    background-color: #B0E0E6;
    width: 70px;
    border: 1px solid red;
  }

JavaScript Code :

$('#button1').click(function(){ 
$( "#pid" ).animate({
    width: "70%",
    opacity: 0.4,
    marginLeft: "0.6in",
    fontSize: "3em",
    borderWidth: "10px"
  }, 1500 );
});

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