导航首页 » 技术教程 » jQuery实现鼠标经过时出现隐藏层文字链接的方法
jQuery实现鼠标经过时出现隐藏层文字链接的方法 73 2024-03-23   

本文实例讲述了jQuery实现鼠标经过时出现隐藏层文字链接的方法。分享给大家供大家参考。具体如下:

这里演示Jquery显示隐藏层的方法,鼠标经过时出现文字链接,模拟评分效果,这里没有加动作,仅显示了前台效果的实现。

运行效果截图如下:

查看图片

在线演示地址如下:

http://demo.gimoo.net/js/2015/jquery-mouse-over-show-txt-demo/

具体代码如下:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JQ显示隐藏层,鼠标经过时出现文字链接</title>
<style>.list span{display:none}</style>
<script type="text/javascript" src="http://www.gimoo.net/t/1905/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
 $(".list li").hover(function(){
  $(this).find("span").show();
 },function(){
  $(this).find("span").hide();
 });
});
</script>
</head>
<body>
<ul class="list">
 <li><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">文字链接</a> <em>显示</em> <span><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">好评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">中评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">差评</a></span></li>
 <li><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">文字链接</a> <em>显示</em> <span><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">好评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">中评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">差评</a></span></li>
 <li><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">文字链接</a> <em>显示</em> <span><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">好评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">中评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">差评</a></span></li>
 <li><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">文字链接</a> <em>显示</em> <span><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">好评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">中评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">差评</a></span></li>
 <li><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">文字链接</a> <em>显示</em> <span><a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">好评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">中评</a> <a href="http://www.gimoo.net/t/1905/5cc8ea6957fc4.html">差评</a></span></li>
</ul>
</body>
</html>

希望本文所述对大家的jQuery程序设计有所帮助。



!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103