基于jQueryui实现的可以控制显示和隐藏,鼠标滑过会移动的菜单

效果如图:
请添加图片描述
主要代码如下:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
	<title>jGlideMenu - Static Menu</title>
	<style  type="text/css">
		body { font-family: verdana, arial, sans-serif; color: #535353; font-size: .62em;  background: #f3f8f0; }
                #launch
                { font-family: tahoma,sans-serif; }
                a#launch
                { text-decoration: none; color: #535353; }
                a#launch:HOVER
                { text-decoration: underline; color: #f90; }
		.ifM_header
		{ cursor: Move; }
		#overview a { color: darkgreen; text-decoration: none; }
		#overview a:HOVER { color: #f90; }
		#jGlide_001 { top: 100px; left: 10px; display: none; /* Hide Menu Until Ready(Optional) */ }
	</style>
	<link rel="stylesheet" type="text/css" href="css/jGlideMenu.css" />
	<!-- Current Release of jQuery - at time of build -->
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<!-- Remove the following line to disabled dragging-dropping / Also Edit CSS to Remove cursor:move from .jGM_header -->
	<script type="text/javascript" src="js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="js/jQuery.jGlideMenu.067.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			// Initialize Menu
			$('#jGlide_001').jGlideMenu({
				tileSource	: '.jGlide_001_tiles' , 
				demoMode	: true 
			}).show();

			// Connect "Toggle" Link	
			$('#switch').click(function(){$(this).jGlideMenuToggle();});
		});
	</script>
</head>
<body>
<p><a href="index.html" title="Back to Overview">&laquo;&nbsp;Back to Project Overview</a></p>
<a href="#" id="switch">Toggle Menu Visibility</a>

<!-- Menu Holder -->
<div class="jGM_box" id="jGlide_001">

		This is Example One

		<!-- Tiles for Menu -->
		<ul id="tile_001" class="jGlide_001_tiles" title="Tile One" alt="Description for tile number one">
			<li rel="tile_002">Link One</li>
			<li rel="tile_003">Link Two</li>
			<li rel="tile_004">Link Three</li>
			<li><a href="http://www.google.com">Link to Google 1</a></li>
			<li><a href="http://www.google.com">Link to Google 2</a></li>
			<li><a href="http://www.google.com">Link to Google 3</a></li>
			<li><a href="http://www.google.com">Link to Google 4</a></li>
			<li><a href="http://www.google.com">Link to Google 5</a></li>
			<li><a href="http://www.google.com">Link to Google 6</a></li>
			<li><a href="http://www.google.com">Link to Google 7</a></li>
			<li><a href="http://www.google.com">Link to Google 8</a></li>
		</ul>
		<ul id="tile_002" class="jGlide_001_tiles" title="Tile Two" alt="Another Tile in This Example">
			<li rel="tile_005">Click Here</li>
			<li><a href="http://www.google.com">Link to Google</a></li>
		</ul>
		<ul id="tile_003" class="jGlide_001_tiles" title="Tile Three" alt="Third Tile is loaded up">
			<li><a href="http://www.google.com">Link to Google</a></li>
		</ul>
		<ul id="tile_004" class="jGlide_001_tiles" title="Search Engines" alt="Find your favorite search engine">
                        <li><a href="http://www.google.com">Link to Google</a></li>
			<li><a href="http://www.yahoo.com">Link to Yahoo!</a></li>
			<li><a href="http://www.ask.com">Link to Ask.com</a></li>
                </ul>
		<ul id="tile_005" class="jGlide_001_tiles" title="Tile Five" alt="Active Spot Light Link">
                        <li><a href="http://www.active8media.com">Link to ASL</a></li>
                </ul>
		<!-- Tiles for Menu -->
</div>
<!-- Menu Holder -->
</body>
<script type="text/javascript" src="/resources/js/plugins/google/analytics/gatag.js"></script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7365212-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</html>

下载代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

reg183

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值