views:

58

answers:

1

Been having a problem making a jQuery slider, I have a list of links that reveal the corresponding information. Different links have different content, so have different heights..

It works but the problem I'm having is when new content of a different height is appended, the slideDown() slides to the height of the previous content (although the new content is there!) then jerks back to the correct height? Also when this happens my 'close' button no longer works.

  $('#timelineDataContainer').slideUp(400,function(){
    $('#timelineData').queue(function(){
      $(this).html('')
        .append('Some new content here....')
        .dequeue();
    });
  });
 $('#timelineDataContainer').slideDown();

Here is a working example from jFiddle

http://jsfiddle.net/Xu6B4/9/

Any help would be appreciated!

+1  A: 

You are calling the SlideDown() without waiting for SlideUp() to finish.

This should be working as expected: http://jsfiddle.net/Xu6B4/12/

vassilis
that's right, put the SlideDown in the callback of the SlideUp.
Matt Sherman
Working great, thanks!
st3