Pastetool #457

URL: , Paste another

<html>
	<head>
		<title></title>
	
		<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js"></script>
		
		<script type="text/javascript">
			var showMenu = function(ev) {
			  //get the position of the placeholder element
			  var pos = $("#placeholder").offset();  
			  var width = $("#placeholder").width();
			  //show the menu directly over the placeholder
			  $("#menu").css( { "left": (pos.left + width) + "px", "top":pos.top + "px" } );
			  $("#menu").show();
			}
				
			$(function() {
				$("#placeholder").mouseover(showMenu);

				

			});
		</script>
		
		<style type="text/css">
		<!--
		#menu {
			width : 400px;
			height : 200px;
			background-color : red;
		}
		#placeholder{
			width : 400px;
			height : 200px;
			background-color : blue;
		}
		-->
		</style>
	</head>
	<body>
		
	

<div style="position: absolute; display: none;" id="menu">
   <!-- menu stuff in here -->
   aaa
   
</div>
<div id="placeholder">Hover over me to show the menu here</div>


</body>
</html>

Download code


This code was pasted on March 3, 2010




Protected with advance Anti-SPAM techniques :)
Coded and designed by Fedmich
Follow us on Twitter