$('#main-slider .slider-content').fadeOut(250, function(){ $('#content'+itemNumber[4]).fadeIn(250); });