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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:15:17+00:00 2026-06-12T21:15:17+00:00

I am playing about with the .animate function in jQuery, I’m fairly new to

  • 0

I am playing about with the .animate function in jQuery, I’m fairly new to the function, however for some reason, I can’t get it to work. Not sure where I might be going wrong.

First, I define the script in the body tags…

<script>
$('.rgt_btn').click(function() {
  $('.ovlBox').animate({
    opacity: 0.0 // I hope this will work? I'm trying to fade this box out, and fade in another... Or something along lines of a carousel.
  }, {
    duration: 2000,
    specialEasing: {
      width: 'linear',
      height: 'easeOutBounce'
    },
    complete: function() {
      $(this).after('// I'm trying to display here another box, but not sure how I can achieve this? The entire <div> box code is quite long to paste here.');
    }
  });
});
</script>

Just below it, I have my box…

<div id="lmovlb" class="ovlBox"> <!-- Content, lots of it... -->
<div style="display: block;" class="lft_btn"></div>
<div style="display: block;" class="rgt_btn"></div>
</div>
  • 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-12T21:15:18+00:00Added an answer on June 12, 2026 at 9:15 pm

    Here is a jsfiddle that demonstrates (excuse the terrible css). Note that as I said before, you should wrap your code in a function and call it on page load. Additionally, use an external js file, if possible.

    Here is an example of how this can be accomplished:

    var yourFunc = function() {
        $('.rgt_btn').click(function() {
            $('.ovlBox').animate({
                opacity: 0.0
            }, {
                duration: 2000,
                specialEasing: {
                    width: 'linear',
                    height: 'easeOutBounce'
                },
                complete: function() {
                    alert("hello");
                }
            });
        });
    }
    $(document).ready(yourFunc);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing about with iText to try get a list of embedded
I have been playing about with LINQ-SQL, trying to get re-usable chunks of expressions
Im playing about with some very simple windows forms. I have an event handler
Just playing about with some vb.net and i dont understand why when i enter
I'm currently playing about with some XNA stuff learning to program AI. Anyway, here's
I am playing about with Core Data and very new to it. This chunk
Can anyone help with the following - been playing about with this but can't
I am playing about with jQuery UI and PartialViews and have run into a
I'm playing about with some DB connections via WinForms and a WebService and I've
I am currently playing about with jQuery Isotope. I love it but it is

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.