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 6596113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:01:56+00:00 2026-05-25T18:01:56+00:00

my jquery animation code is working fine in IE and firefox, but it doesnt

  • 0

my jquery animation code is working fine in IE and firefox, but it doesnt work in Chrome and safari. any suggestions?

this is my animation code for jquery

$('#menu ul li a').click(function (e) {

    /* On a thumbnail click */
    $('li.menuItem').removeClass('act').addClass('inact');
    $(this).parent().addClass('act');

    var pos = $(this).parent().prevAll().length; //.prevAll('.menuItem').length;
    pos = pos - 1;


    $('#slides').animate({ marginLeft: -positions[pos] + 'px' }, 450);
    /* Start the sliding animation */

    e.preventDefault();
    /* Prevent the default action of the link */
});
  • 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-25T18:01:56+00:00Added an answer on May 25, 2026 at 6:01 pm

    if I remember well jQuery computes well without ‘px’ when animating or applying css for easier manipulation, and it is more logical because animating is calculation with numbers, not strings. Then isn’t it a problem of css property ? Have you tried to set at least a ‘position’:’relative’ or ‘display’:’block’ or ‘display’:’inline-block’ to the element you are animating. Because css needs that type of display for applying margin properties. Try animate ‘left’ instead of ‘margin-left’ for example, if it works, it comes from a needed css property for applying margin.

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

Sidebar

Related Questions

Are there any jQuery 1.3 animation-transitions that work in both Firefox 3 and IE7?
Why this delay of Jquery animation does not work as it should be? $(
I tried the jQuery fadeIn animation in all browsers and it work good, but
I'm trying to achieve some animation using jQuery. I have it working but I'm
I started to use Dashcode with a Safari Custom Project, my apps work fine,
The site I'm working on opens with a fancy jQuery opacity animation. Currently It's
I've created an intro animation to a page I'm working on using jQuery and
i am working on a endless jquery animation, which draws 6 divs and swaps
I have written some jQuery code to use the slideUp animation when deleting rows
I am having a tough time figuring out why this piece of jQuery code

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.