1 Replies - 4925 Views - Last Post: 28 March 2010 - 08:23 PM

#1 Guest_Keftenk*


Reputation:

slide panel/hover help

Posted 28 March 2010 - 12:43 PM

I'm trying to create a menu navigation system from the top of the page.
I want it so when I hover over the link, it drops down (the link drops down; so it'd be as if there was a whole field being hidden beyond the 0px mark) with the related field.

I've gotten it to work, somehow but it still isn't right.
A few issues are:

- when I hover over .drop_slide and then if I choose to close it by hovering back over the .drop_slide it does as it's told, which is "slide, slide". I'm interested in rectifying this issue so it doesn't do that, however I just don't know how.

- The idea is to have multiple links in the .slide, so I need it to be constantly open while the user mouses over the other links. Should this be created in one field? If so, how would I do that with a drop down in mind?

- Am I approaching this completely wrong? Lol. Should I be researching into .animate? I've been looking at it actually, but I can't get anything to grow negatively. Say; marginTop: -85px or something.

ANY help is appreciated, thanks!
<html>
<head>
<title>test slide panel</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function(){

	function slide() {
  	$("#panel").slideToggle("slow");
	}

	$(".drop_slide").hover(slide, stop);
	$("#panel").hover(stop, slide);
	 
});
</script>

<style type="text/css">
body {
	margin: 0 auto;
	padding: 0;
	width: 570px;
	font: 75%/120% Arial, Helvetica, sans-serif;
}
a:focus {
	outline: none;
}
#panel {
	background: grey;
	height: 200px;
	display: none;
}
.slide {
	margin: 0;
	padding: 0;
	background-color: red;
}
.drop_games {
	width: 200px;
	height: 31px;
	padding: 10px 10px 0 0;
	display: block;
	font: bold 120%/100% Arial, Helvetica, sans-serif;
	color: #fff;
	text-decoration: none;
}
</style>
</head>

<body>

<div id="panel">
additional links here...or information
</div>

<p class="slide"><a href="#" class="drop_slide">test link</a></p>


</body>
</html>



Is This A Good Question/Topic? 0

Replies To: slide panel/hover help

#2 SeiferMaster   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 27
  • Joined: 28-October 09

Re: slide panel/hover help

Posted 28 March 2010 - 08:23 PM

Simply do the slide effect on your links container. That way all your links will open as soon as you hover it but won't close as long as you're within that container. At least that's what I get from what you're saying.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1