Hi
With the website I'm currently working on, I have this strange problem while animating some elements with jQuery.
Instead of trying to explain what's going wrong, I've made a sample of the problem. Have a look at this: http://www.zupa.be/AnimationLag/.
Hover one of the numbers at the upper right corner and click a link. The current green div should close smoothly and the matching div for the clicked link should open smoothly.
This is the function that contains the animations.
All of you who know something about jQuery, just take a look at http://www.zupa.be/AnimationLag/, open the source, take a look at the script and make my day.PHP Code:
function setPanelWidth(){
$('.collapsed').animate({width:28},'fast','linear',function(){
$('.collapsed *').css('visibility','hidden');
var w = $('#main').width()-2;
$('#main').children('.collapsed').each(function(){
w -= $(this).width()+2;
});
$('.panel *').css('visibility','visible');
$('.panel').animate({width:w},'fast','linear');
});
}
Thanks in advance!
Bookmarks