问题
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:
You are calling the SlideDown() without waiting for SlideUp() to finish.
This should be working as expected: http://jsfiddle.net/Xu6B4/12/
来源:https://stackoverflow.com/questions/3746536/jquery-slideup-slidedown-issue