Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 841137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:44:37+00:00 2026-05-15T05:44:37+00:00

is it possible to animate a html5 video element <div id=cont> <video id=movie width=320

  • 0

is it possible to animate a html5 video element

<div id="cont">
    <video id="movie" width="320" height="240" preload controls>
      <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"'>
      <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
      <source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"'>
    </video>    
    </div>

<script type="text/javascript">
    $(document).ready(function(){

        $('#cont').animate({"left": "500px"}, "fast");
        //$('#movie').css("left", "300px");
    });
    </script>

This seems not to work!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:44:38+00:00Added an answer on May 15, 2026 at 5:44 am

    left will have no meaning unless it has a position other than static (the default). Give it a position: relative css attribute first, like this:

    $('#cont').css('position', 'relative').animate({"left": "500px"}, "fast");​​​​​​​​​​
    //or...
    $('#cont').css({ position: 'relative'}).animate({"left": "500px"}, "fast");​​​​​​​​​​
    

    You can see a quick demo here

    Alternatively, and even better, give the <div>, <video>, whatever you want to animate, this attribute in the stylesheet (either via the ID or a class), like this:

    #cont { position: relative; }
    //or...
    .relative { position: relative; }
    

    In the second approach you’d add a class="relative" to the element you’re animating. With this approach, your current code works, so choose a method, stylesheet or .css(), either works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does any one know if its possible to animate app.current.mainwindow.width so that you get
Possible Duplicate: Can you animate a height change on a UITableViewCell when selected? This
Using keyframes , it is possible to animate an element as soon as it
is it possible to animate the background colour of an element in jquery without
using jQuery it is possible to do something like this: $(div)[5].animate() This seems to
Is it possible to animate the change of a UIProgressView such that the display
I have html input <input id=txtSearch value=Search... type=text/> Is it possible to animate the
I am wondering if it is possible to animate background url using jQuery, and
Is it possible to animate a change in TextView 's actual text content an
Morning mr. Stackoverflow. Is it possible to .animate between 2 img ? Like, change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.