/    Sign up×
Community /Pin to ProfileBookmark

jQuery easy question?

Hello i am trying to create a little easy navigation menu that only has five links and when you hover over one div it will show the contents of that selection…e.x music div will show ever music genre in a different div that appears when you hover over it.

i have it to where the div will show when you hover over it but the problem is when you try to go inside the div that appears it disappears i want it to beable to go to it and select a link from it

here is a simple part with just one div

div class=”selectedDiv”>Content for class “selectedDiv” Goes Here</div>
<div class=”childDiv”>
<div id=”insideChildDiv”>Content for id “insideChildDiv” Goes Here</div>
</div>

here is the jQuery:

$(document).ready(function() {

$(“.selectedDiv”).hover(function(){
$(“.childDiv”).animate({opacity: “show”}, “slow”);

}, function() {//seperate the show/hide into two different functions will not work right other qwise
$(“.childDiv”).animate({opacity: “hide”}, “fast”);
});
});

the only real css that will matter is i have the childDiv display:none;

any help would be freaking awesome!

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@hyperionXSFeb 24.2012 — Move childDiv inside the selectedDiv. I suppose you will have to make some CSS changings, but this is the way.
×

Success!

Help @repeater09 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...