I am designing a responsive layout with a carousel. The carousel has a control that allows the user to toggle the entire box, hiding and showing the carousel. You can see this fully working here: http://pixelcakecreative.com/cimlife/responsive2/
It seems like it is functioning very sluggishly. I was thinking that my jquery was written poorly, and it might be slowing the performance down. My jquery is as follows:
$("#closeBox a").click(function(){
if ($(this).find('span').hasClass('minus')) {
$(this).find('span').removeClass('minus').addClass('plus');
$(".padCar").css("padding-bottom","0");
} else if ($(this).find('span').hasClass('plus')) {
$(this).find('span').removeClass('plus').addClass('minus');
$(".padCar").css("padding-bottom","20px");
}
$('#carousel').slideToggle('slow');
return false;
});
Any ideas why it is so jumpy? Perhaps my jquery should be better written, or maybe it is something else on the page that causes this?