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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:44:16+00:00 2026-05-24T20:44:16+00:00

Great people of StackOverflow, save my ass please :) I’ve been trying to get

  • 0

Great people of StackOverflow, save my ass please 🙂

I’ve been trying to get this to work for a while now, i’ve read the documentation repeatadly, tried lots of stupid things, and now the more I look at it and think my mind goes blank, so if someone could shed some light i’d be grateful. I’m trying to get the jQuery to animate the addClass command. It works fine, adds and removes the class to the element no problem, but I want it to fadeIn the class and then fadeOut the class, here’s the code:

<script type="text/javascript">
  function addingClasses(id,myClass) {
    $(id).addClass(myClass).animate({
      show: 'fadeIn',
      speed: '2000',
      hide: 'fadeOut'
    });
  }

  function removingClasses(id,myClass) {
    $(id).removeClass(myClass);
  }
</script>

<div id="about" class="sittingPretty" onmouseover="addingClasses(this, 'aboutHover')" onmouseout="removingClasses(this, 'aboutHover')">
    <p>About</p>
</div>

If someone could help, i’d be extremely grateful, thanks again guys 🙂

  • 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-24T20:44:17+00:00Added an answer on May 24, 2026 at 8:44 pm

    What you want to do is set a var and transform to that value.

    a short example would be:

    <script type="text/javascript">
        function addingClasses(id,myClass) {
            var newValue = { opacity : 100 }
            $(id).addClass(myClass).animate(newValue, 1000);  
        }
        function removingClasses(id,myClass) {
            var newValue = { opacity : 0 }
            $(id).removeClass(myClass).animate(newValue, 1000);
        }
    </script>
    

    This will gradually alter the opacity from whatever it currently is to the value you pass it.

    Its not the best method but it will work 🙂

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

Sidebar

Related Questions

Hello great people of stackoverflow.com, I have a stumbled upon a great difficulty in
With the help from some great people on here i'va manged to get a
ALM is great. But I can't get it to work on a project that
Sorry for the not so great title, but I'm curious how people build a
I have the following RewriteRule: RewriteRule ^/people/([A-Za-z0-9\-\_]*)/?$ /people/people_details.cfm?person=$1 [I,L] ...it works great for forwarding
basically, im calling Html.TextAreaFor to display a form, which is great/not a problem... people
Oh great Stackoverflow, I beseech thee... I need to do the following: CREATE UNIQUE
People who talk about loggers here never talke about EventLog, I think this is
Would be great to get an API call that returns a list of users
While reading through the great online PHP tutorials of Paul Hudson he said Perhaps

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.