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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:16:48+00:00 2026-05-23T02:16:48+00:00

JQuery addclass is not adding a class at all and thus web-kit transitions are

  • 0

JQuery addclass is not adding a class at all and thus web-kit transitions are not working. In the function below the first add class is working whereas the second is not. What is going on.

Function

function closecont() {
    $('#contpanel').addClass('contentclosed');
    $('#slideback').addClass('slideback');
}

CSS

.gallery .content #slideback {
    position:absolute;
    background:url(images/ui/cont.png) center top;
    height:44px;
    width:24px;
    top:340px;
    left:254px;
    overflow:hidden;
    opacity:0.0;filter:alpha(opacity=0);
    -webkit-transition-property:opacity;
    -webkit-transition-duration:600ms;
}
.slideback {
    opacity:1.0;filter:alpha(opacity=100);
    -webkit-transition-property:opacity;
    -webkit-transition-duration:600ms;
}

Content closed is working perfectly. .slideback is not. Here is a very similar fiddle that I made. http://jsfiddle.net/4WmJz/15/

Any ideas .

Marvellous

  • 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-23T02:16:49+00:00Added an answer on May 23, 2026 at 2:16 am

    You forgot to add the !important flags to your styles, but you used it in the first half of your fiddle. That’s why it worked with the first element.

    By default CSS rules are applied in a certain order. More specific selectors override more general ones, so if you add a class (general) to an element, the CSS rule set for the item ID (specific) will take priority.

    .slideback {
        opacity:1.0 !important;filter:alpha(opacity=100) !important;
        -webkit-transition-property:opacity !important;
        -webkit-transition-duration:600ms !important;
    }
    

    Your fixed fiddle: http://jsfiddle.net/4WmJz/16/

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

Sidebar

Related Questions

jQuery 1.4: $('#menu li:last:not(.ignore)').addClass('last'); HTML: <div id=menu> <ul> <li>item 1</li> <li>item 2</li> <li class=ignore>item3</li>
I have the following jQuery: $(#toolbar).hover(function () { $(.logo).fadeOut(slow, function () { $(this).addClass(logohover) $(this).parent().addClass(logohover).fadeIn(slow,
I am using the following jquery code: $(#top ul li.corner).mouseover(function(){ $(span.left-corner).addClass(left-corner-hover); $(span.right-corner).addClass(right-corner-hover); $(span.content).addClass(content-hover); }).mouseout(function(){
Doing odd/even styling with jQuery is pretty easy: $(function() { $(.oddeven tbody tr:odd).addClass(odd); $(.oddeven
Code 1 is conflict with another Jquery function in the code, then I add
in my jQuery code, removeClass is not working. Whenever I click hide link the
I have below Jquery with me. $(.load-fragment).each(function() { var $objThis = $(this); var fname
I have got below JQuery where I am performing the .load function. $(.load-fragment).each(function() {
I have the following jQuery calls chain: $(someSelector).nextUntil(.specialClass).addClass(classBasedSomeSelectorObject) I need to addClass that's value
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js></script> <script type=text/javascript> function bigtosmalltriangle() { $(this).siblings(div.break).removeClass('triangle3').addClass('triangle1'); setTimeout ( smalltomediumtriangle(), 400 ); }

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.