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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:16:52+00:00 2026-05-28T16:16:52+00:00

The animation produced by my jQuery function is shaky, and I’ve been looking through

  • 0

The animation produced by my jQuery function is shaky, and I’ve been looking through different SO solutions, such as adding jquery.easing, but no luck. Is the problem the iframes in each div?

Any ideas on how to smooth out the animation? Is my basic toggle function the best way?

JSFiddle: http://jsfiddle.net/gwLcD/8/

The basic markup is below, and is repeated numerous times on the page (with blocks of text in between each “videotoggle” div):

 <div class="videotoggle">

    <p><h2 class="entry-title">View a few minutes of the (title) video </h2></p>

    <div class="videoblock">

    <iframe width="560" height="315" src="http://www.youtube.com/embed/????????"
    frameborder="0" allowfullscreen></iframe>

    </div></div>

And the function:

$(document).ready(function(){
$(".videoblock").hide();  //closes all divs on first page load
$(".entry-title").click(function() {
    $this = $(this);  //this next code only allows one open div at a time
    $content = $this.closest('.videotoggle').find(".videoblock");
    if (!$this.is('.active-title')) {
        $('.active-title').removeClass('active-title');
        $this.addClass('active-title');
        $(".videoblock:visible").slideToggle(400);  //slide toggle
        $content.slideToggle(400);
    }
});
});
  • 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-28T16:16:53+00:00Added an answer on May 28, 2026 at 4:16 pm

    Andrew’s solution is correct, but I would still put the css like this (if javascript is off):
    .videoblock{width:560px; height: 315px; overflow:hidden}

    and add the simultaneous animation:

    $('.videoblock').css('height','0');
    $(".entry-title").click(function() {
        $this = $(this);
        $content = $this.closest('.videotoggle').find(".videoblock");
        if (!$this.is('.active-title')) {
    
            $('.active-title').removeClass('active-title');
            $this.addClass('active-title');
            $(".videoblock:visible").animate({height: "0"}, { duration: 400, queue: false });
            $content.animate({height: "315"}, { duration: 400, queue: false });
        }
    });
    

    Here is the link to the final: http://jsfiddle.net/gwLcD/21/

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

Sidebar

Related Questions

I am having jQuery animation issues... I have a footer with a hidden div
I have an slider animation but on clX.click event #close div hides before it
Doing some jquery animation. I have certain divs set up with an attribute of
I´m building a jquery animation from a multidimensional array, and in the callback of
The animation (image changes) doesn't stop on the onmouseout event. Why? JavaScript: function thumbnail
I have a jQuery animation that animates the 'scrollLeft' on a container to produce
I'm using the mousemove event handler with jQuery: $(document).mousemove(function(e) { updateDownloadPosition(e); } ); It
I recently switched from using NSTimer to CVDisplayLink to redraw my OpenGL animation, but
jQuery animation is too slow on IE. Particularly background image animation. Is there other
I'm trying to create a never-ending looping animation using ExtJs, but am hitting the

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.