Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible typo on animate API documentation #1157

Open
jordanmoore753 opened this issue Dec 19, 2019 · 0 comments
Open

Possible typo on animate API documentation #1157

jordanmoore753 opened this issue Dec 19, 2019 · 0 comments

Comments

@jordanmoore753
Copy link

Hello! There may be a possible typo on the animate API documentation.

In the example shown, the code is:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>animate demo</title>
  <style>
  div {
    background-color: #bca;
    width: 100px;
    border: 1px solid green;
  }
  </style>
  <script src="https://code.jquery.com/jquery-3.4.1.js"></script>
</head>
<body>
 
<button id="go">&raquo; Run</button>
<div id="block">Hello!</div>
 
<script>
// Using multiple unit types within one animation.
 
$( "#go" ).click(function() {
  $( "#block" ).animate({
    width: "70%",
    opacity: 0.4,
    marginLeft: "0.6in",
    fontSize: "3em",
    borderWidth: "10px"
  }, 1500 );
});
</script>
 
</body>
</html>

However, the next paragraph explaining it says that:

The first button shows how an unqueued animation works. It expands the div out to 90% width while the font-size is increasing.

It is my understanding that the animate method expands the div out to 70% width, since the value for the width property in the properties object is 70%.

Thank you for reading this and have a great day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants