I want to make in if...else statement in jQuery but I am not sure how to set it up for what I want.
Here is what I have:
$(document).ready(function(){
$("#quotes").hide();
$("button").click(function(){
if($("#quotes").hide()==true){
$("#summary").hide();
$("#quotes").fadeIn("slow");
} else {
$("#quotes").hide();
$("#summary").fadeIn("slow");
}
});
});
I want it so that if #quotes is hidden, then on button click, hide #summary and fadeIn #quotes. Otherwise, (if #quotes is showing) hide #quotes and fadeIn #summary.
$('#quotes').toggle()