Home › Forums › JavaScript › jQuery Fading Menu Question › Re: jQuery Fading Menu Question
Point taken. Here is the javascript:
$clicked = $(this);
// if the button is not already “transformed” AND is not animated
if ($clicked.css(“opacity”) != “1” && $clicked.is(“:not(animated)”)) {
$clicked.animate({
opacity: 1,
borderWidth: 5
}, 600 );
// each button div MUST have a “xx-button” and the target div must have an id “xx”
var idToLoad = $clicked.attr(“id”).split(‘-‘);
//we search trough the content for the visible div and we fade it out
$(“#content”).find(“div:visible”).fadeOut(“fast”, function(){
//once the fade out is completed, we start to fade in the right div
$(this).parent().find(“#”+idToLoad[0]).fadeIn();
})
}
//we reset the other buttons to default style
$clicked.siblings(“.button”).animate({
opacity: 0.5,
borderWidth: 1
}, 600 );
});
Here is the body:
This content is for home.
This content is for about.
This content is for contact.
When I add a div to any content area, About for example, what is inside the div does not show up.
Example:
This content is for about.
This does not appear
Any help would be appreciated.