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

  • Home
  • SEARCH
  • 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 7815201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:26:52+00:00 2026-06-02T05:26:52+00:00

When I add the transition line into my code it breaks jQuery. How can

  • 0

When I add the transition line into my code it breaks jQuery. How can I fix it?

a(this).next().css({
    left: c,
    transition: 'opacity 1s ease-in-out'
});

I’m trying to set up a fade from one div to the next inside a slider

  • 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-06-02T05:26:55+00:00Added an answer on June 2, 2026 at 5:26 am

    Step 1) Remove the semi-colon, it’s an object you’re creating…

    a(this).next().css({
        left       : c,
        transition : 'opacity 1s ease-in-out';
    });
    

    to

    a(this).next().css({
        left       : c,
        transition : 'opacity 1s ease-in-out'
    });
    

    Step 2) Vendor-prefixes… no browsers use transition since it’s the standard and this is an experimental feature even in the latest browsers:

    a(this).next().css({
        left             : c,
        WebkitTransition : 'opacity 1s ease-in-out',
        MozTransition    : 'opacity 1s ease-in-out',
        MsTransition     : 'opacity 1s ease-in-out',
        OTransition      : 'opacity 1s ease-in-out',
        transition       : 'opacity 1s ease-in-out'
    });
    

    Here is a demo: http://jsfiddle.net/83FsJ/

    Step 3) Better vendor-prefixes… Instead of adding tons of unnecessary CSS to elements (that will just be ignored by the browser) you can use jQuery to decide what vendor-prefix to use:

    $('a').on('click', function () {
        var myTransition = ($.browser.webkit)  ? '-webkit-transition' :
                           ($.browser.mozilla) ? '-moz-transition' : 
                           ($.browser.msie)    ? '-ms-transition' :
                           ($.browser.opera)   ? '-o-transition' : 'transition',
            myCSSObj     = { opacity : 1 };
    
        myCSSObj[myTransition] = 'opacity 1s ease-in-out';
        $(this).next().css(myCSSObj);
    });​
    

    Here is a demo: http://jsfiddle.net/83FsJ/1/

    Also note that if you specify in your transition declaration that the property to animate is opacity, setting a left property won’t be animated.

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

Sidebar

Related Questions

I add this code in my activity public boolean onKeyDown(int keyCode, KeyEvent event) {
When I want to add the line SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED right
I add my page top link button like this: <a name=top></a> . . .
I add many check boxes to the excel sheet programaticaly using the following code:
I add this class to library/My/Validate/PasswordConfirmation.php <?php require_once 'Zend/Validate/Abstract.php'; class My_Validate_PasswordConfirmation extends Zend_Validate_Abstract {
I add local maven repository, I add the local dependency in my project. this
---edit--- Is there any additional information I can give to help solve this problem?
We found a JQuery plugin called FixedTable that is used to add scroll bars
I have following code which add BackButton on my view's navigation item's tabbar. It
I have written a code in Python to create a transition probability matrix from

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.