I suggest to add/remove extra class instead of changing id. So instead of changing to #less, add class "less". CSS entry would be #more.less, and instead of changing it back to #more, remove class "less".
Code would be something like this:
Code:
$('#more').click(function(){
if(!$(this).hasClass('less'))
{
$('#major').fadeOut('slow', function(){
$('#captain').animate({width: "800px"}, 'slow').delay(100).animate({height: "620px"}, 'slow', function(){
$('.hide').fadeIn('slow');
$('#more').text('Read Less').addClass('less');
});
});
}
else{
$('#hide').fadeOut('slow', function(){
$('#captain').animate({height: "260px"}, 'slow').delay(100).animate({width: "320px"}, 'slow', function(){
$('#more').text('Read More').removeClass('less');
$('#major').fadeIn('slow');
});
});
}
});
Bookmarks