I am trying to use the jQuery UI slide effect for the animated appearance of buttons inside a slidedown menu but the animation of the buttons sliding from left to right seems too jagged especially when there is more code involved. Is there a way to make it smoother? Is this an issue with the timing of loading the elements' (images/buttons) position and if so how can I fix it or is it something else?
Here is an example:
http://jsfiddle.net/userdude/ptnaP/6/
The code in the jsFiddle link above includes a live link to the jQuery UI bundle... but using a custom minimized version, including only the core elements and the slide and drop effects libraries doesn't seem to make the animation any smoother.
jQuery:
$(document).ready(function(){
$(".bc").hide();
$(".bc img").hide();
$("#header").click(function(){
var selectedEffect = "slide";
$(".bc").stop(true, true).delay(500).slideDown(500);
$("#1").stop(true, true).delay(800).effect(selectedEffect,600);
$("#2").stop(true, true).delay(1200).effect(selectedEffect,600);
$("#3").stop(true, true).delay(1600).effect(selectedEffect,600);
});
});
HTML:
<div id="header">Click Me</div>
<div class="bc">
<img src="http://i49.tinypic.com/t9a8sn.png" id="1" />
<img src="http://i49.tinypic.com/t9a8sn.png" id="2"/>
<img src="http://i49.tinypic.com/t9a8sn.png" id="3"/>
</div>
CSS:
div.bc {
border: 15px #1d1d1d solid;
border-radius:10px;
margin:50px auto;
width: 320px;
height: 250px;
}
div.bc img {
margin-top:22px;
width:283px;
height:53px;
}