$(".bottomnavinvest").stop().animate({'bottom' : '40px'}, 800, 'easeInBounce',
function(){
$(".bottomnavinvest").hide();
});
}
$(".demolink").click(function(){
if ($(".bottomnavinvest").is(':visible')); {
bottomnavinvestout();
}
$("#contentinner").children().fadeOut(1000, function(){
$('#demoreel').fadeIn(1000, function(){
bottomnavdemoin();
});
});
return false
});
$(".investlink").click(function(){
if ($(".bottomnavdemo").is(':visible')); {
bottomnavdemoout();
};
$("#contentinner").children().fadeOut(1000, function(){
$('#investment').fadeIn(1000, function(){
bottomnavinvestin();
});
});
return false
});
The demo in and demo out functions are the same as the invest in and invest out functions,
I am trying to bounce a secondary nav bar up then hide it, fadeout then in new content, then bounce down a different navbar on appropriate button clicks
I开发者_C百科t is fading out, then in the new content only to fade that out then in again.
Can anyone tell me what I am doing wrong or how i can improve on what I am doing?
Cheers Ben
After formatting your question it's even more easy to see:
$(".bottomnavinvest").stop().animate({'bottom' : '40px'}, 800, 'easeInBounce',
function(){
$(".bottomnavinvest").hide();
});
}
$(".demolink").click(function(){
if ($(".bottomnavinvest").is(':visible')); { //THIS ';' BREAKS THE CODE, REMOVE IT !!!
bottomnavinvestout();
}
$("#contentinner").children().fadeOut(1000, function(){
$('#demoreel').fadeIn(1000, function(){
bottomnavdemoin();
});
});
return false
});
$(".investlink").click(function(){
if ($(".bottomnavdemo").is(':visible')); { //THIS ';' BREAKS THE CODE, REMOVE IT !!!
bottomnavdemoout();
}; //THIS ';' NOT NEEDED, REMOVE IT !!!
$("#contentinner").children().fadeOut(1000, function(){
$('#investment').fadeIn(1000, function(){
bottomnavinvestin();
});
});
return false
});
Remove all those extra ;
in your code, and it should work.
精彩评论