- Joined
- Dec 15, 2009
- Messages
- 1,387
- Reaction score
- 236
I got pretty interested in JavaScripting so tried a lot of cool stuff and I love it very much
Need some help with my horizontal navigation I tried, basically the subnav slide down when you hover on the 'Point on me', and it slides up when your mouse goes out from the text.
But I couldn't make it, like..erm..when you hover the subnav and the 'Point on me', it will stop there until your mouse got out off the 'Point on me' and subnav.
But the problem is, I can't code both of them coding getting the same argument cause they aren't in the same div, they are separated far away.
DEMO:
Source codes:
Hope you guys understand my bad english
Please give me a hand..please :*:
Need some help with my horizontal navigation I tried, basically the subnav slide down when you hover on the 'Point on me', and it slides up when your mouse goes out from the text.
But I couldn't make it, like..erm..when you hover the subnav and the 'Point on me', it will stop there until your mouse got out off the 'Point on me' and subnav.
But the problem is, I can't code both of them coding getting the same argument cause they aren't in the same div, they are separated far away.
DEMO:
You must be registered to see links
Source codes:
Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Toggle me </title>
<style type="text/css">
div {
float:left;
padding-left:10px;
}
.nav {
background:url(subnav.png) no-repeat;
width:844px;
height:22px;
display:none;
}
</style>
</head>
<body>
<div class="toggle" style="cursor:pointer"><b>Point on me</b></div>
<div>RANDOM</div>
<div>RANDOM</div>
<div>RANDOM</div>
<div>RANDOM</div>
<div>RANDOM</div>
<br />
<!-- NAV POP OUT -->
<div class="nav"></div>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$('.toggle').hover(function(){
$('.nav').slideDown();
},
function (){
$('.nav').slideUp();
});
});
</script>
</body>
</html>
Hope you guys understand my bad english
Please give me a hand..please :*: