Home › Forums › JavaScript › jQuery Fading Menu Question
- This topic is empty.
-
AuthorPosts
-
August 17, 2009 at 1:43 pm #25786
MTM777
MemberI’m a complete beginner who has been messing around with the navigation in this post:
http://css-tricks.com/learning-jquery-fading-menu-replacing-content/
I’m finding that I when I wrap anything in divs within each content area div, it will not show up.
It seems like an easy fix in the js but I don’t know how to do it.Any help would be appreciated.
August 19, 2009 at 6:52 pm #62431Mr KiTT3N
MemberProviding code snipplets or better yet a link to where this error is at helps out tremendously
A link to a tutorial doesnt ….
August 25, 2009 at 2:01 pm #62704MTM777
MemberPoint taken. Here is the javascript:
Code:$(“#page-wrap div.button”).click(function(){$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:
Code: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:Code:This content is for about.
This does not appear
Any help would be appreciated.
May 4, 2010 at 10:08 pm #75091gmeben
ParticipantI’m experiencing the same problem; none of the nested divs appear.
There has to be some way to denote showing the nested divs in the jQuery when clicked upon.
Help please!May 11, 2010 at 8:58 pm #75381gmeben
ParticipantIf there isn’t a fix to this, can anyone lead me to an alternative method that has at least has a vaguely similar effect?
May 29, 2010 at 9:53 am #76716gmeben
Participantthankfully, chris did a screencast for this exact issue just a few days after i posted. i’m posting this for anyone reading this thread in the future who wants to know of the alternative:
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.