var allP = $('p'); var current = 0; allP.each(function () { allP.css('display', 'none'); });
$('p').hide().eq(current).show();