Question

Does animate() work without jQuery, in pure JS?

Does animate() work without jQuery, in pure JS?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The animate() works with pure JavaScript other than jquery.

Program

<!DOCTYPE html>

<html>

    <head>

        <title>Kuch Bhi</title>

        <style>

            /* some style  for box*/

            #box {

                width: 100px;

                height: 100px;

                text-align: center;

                vertical-align: middle;

                line-height: 90px;

                background-color: aquamarine;

                position: absolute;

                left: 650px;

                top: 250px;

            }

        </style>

    </head>

    <div id="box">Box</div>

    <body>

        <script type="text/javascript">

            //performing animations using animate()

            document.getElementById('box').animate(

                [

                    // keyframe units

                    { transform: 'rotate(1deg)' },

                    { transform: 'rotate(-360deg)' }

                ],

                {

                    // adjust time and iteration

                    duration: 1000,

                    iterations: Infinity

                }

            );

        </script>

    </body>

</html>

Output

ход

Add a comment
Know the answer?
Add Answer to:
Does animate() work without jQuery, in pure JS?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1.Which of the following jQuery statement is correct and equivalent to the following traditional JS statement?...

    1.Which of the following jQuery statement is correct and equivalent to the following traditional JS statement? document.getElementById("result").innerHTML="<p>hello</p>"; A.$("#document.result").val("<p>hello</p>"); B.$("#result").innerHTML("<p>hello</p>"); C.$("#result").html("<p>hello</p>"); D.$("#document.result").text("<p>hello</p>"); 2. Which of the following is considered to be an advantage of jQuery over traditional JavaScript? (choose multiple) -Faster loading and processing -Handles browser compatibility -Provide useful shorthand methods -Compiled rather than interpreted

  • Some might be tempted to try to learn jQuery without first learning the basics of coding...

    Some might be tempted to try to learn jQuery without first learning the basics of coding in "raw" JavaScript. Discuss whether this is a viable approach.

  • What is a SIMPLE way to load an external JSON file to JavaScript (WITHOUT USING JQUERY)?...

    What is a SIMPLE way to load an external JSON file to JavaScript (WITHOUT USING JQUERY)? Example: JSON File: { "Orders": [ { "ordernumber": 83189393, "time": "2:54:18 AM", "customer": { "customerid": 66719, "firstName": "Lucy", "lastName": "Jones", "city": "Dallas", "state: "Texas" } } ] }

  • for Javascript, JQuery When the page is first opened a user will see the name field...

    for Javascript, JQuery When the page is first opened a user will see the name field and the three vacation images to the left of the page. The page should behave according to the following rules. 1. When a user's mouse pointer goes over any image, that image's border will change to be "outset 10px" and when the mouse pointer leaves that image it's border will change to "none". 2. When the user clicks a "Vacation" image on the left,...

  • "Zone-refining" is a technique to make high-purity crystals of a pure element. Without zone-refining of silicon,...

    "Zone-refining" is a technique to make high-purity crystals of a pure element. Without zone-refining of silicon, it is unclear whether there would be a semiconductor industry. In this technique, a heater melts a small zone of material, and the heater and zone move along a bar of material (see Fig. 5.17a). The solutes segregate to the far end of the bar. The technique works for removing B-solutes from A-metal when the A-rich part of the A-B phase diagram is as...

  • What tools does Kali have to crack passwords that work without a dictionary list?8 9

    What tools does Kali have to crack passwords that work without a dictionary list?8 9

  • circle the correct answer please. Please reply Asap. 8. What does the following jQuery code do?...

    circle the correct answer please. Please reply Asap. 8. What does the following jQuery code do? s ("inage").attr(are", imagoURL) a Gets the value of the sre aribute for the element with an id of "image" and stores it in a variable named imageURL Sets the value of the sre attribute for the element with an id of "image" to the value in a variable named imageURL Gets the values of the sre attribute for each element with a class of...

  • Name the three, basic, pure and ideal elements used to model mechanical systems. What does pure...

    Name the three, basic, pure and ideal elements used to model mechanical systems. What does pure mean? What does ideal mean? Are these passive or active elements? Which store energy? Which dissipate energy? What are the constitutive equations describing the behavior of each element? What is the energy storage / dissipation expression for each element?

  • please.show work and answer full.question. this js discrete math. 1. Determine whether each of the functions...

    please.show work and answer full.question. this js discrete math. 1. Determine whether each of the functions is one-to-one and/or onto. a. f:R - R, f(x) = 19(x) = log2(x) one-to-one onto onto one-to-one b. f:N NX N, f(x) = (x,x) onto one-to-one c. f:R+ (-1,1), f(x) = cos(x) one-to-one onto d. 8:[2,3) –> (0, +), f(x) = ***

  • 2. a) What is the density (in g/L) of pure Argon gas confined in a gas...

    2. a) What is the density (in g/L) of pure Argon gas confined in a gas cylinder having a pressure of 240 kPa at 15 °C ? (Assume that the gas behaves ideally at this temperature and pressure) b) The gas cylinder in part (a) explodes if the pressure of the gas excedes 7 atm. So the gas in part (a) can safely be heated to which maximum temperature (in °C) without exploding the cylinder? Answers: a) g/L b) Constants:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT