Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: jQuery animate

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    1
    Member #
    28979
    Hi,

    I'm quite new to jQuery. I'm trying to move a div from one place to another on page load. Here's what I have but it doesn't seem to be working at all...

    I've included jQuery of course and here's what I got in the head section:

    Code:
    <script type="text/javascript">
    $(window).load(function() {
        $('#top_right').animate({
        'marginLeft' : "+=50px"});
    });
    </script>
    And here's the div in the body section:

    Code:
        <div id="top_right">
            <div id="facebook"><a href="http://www.facebook.com/pages/Manu-Design-Store/156231671061542"><img src="<?php echo $templateURI; ?>/images/manu/facebook.png" /></a></div>
        </div>
    Any ideas why it isn't working?

    Any help would be appreciated. Thank you.

    Tony.

  2.  

  3. #2
    Member Brillig's Avatar
    Join Date
    Mar 2010
    Posts
    32
    Member #
    21509
    I've had animate not work depending on the css position type used.

    Is that a sub div of anything else? How is it positioned?
    Win.ly: A scientific/statistical approach to win prizes online.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:08 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com