惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
D
DataBreaches.Net
F
Full Disclosure
腾讯CDC
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
J
Java Code Geeks
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
Know Your Adversary
Know Your Adversary
AWS News Blog
AWS News Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
O
OpenAI News
Project Zero
Project Zero
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security

博客园 - 五味果

.net Core 调用微信Jsapi接口,H5解析二维码 TextBoxFor控件的扩展---Bootstrap在mvc上的应用 Dapper Vs Dbentry 外地手机号码,请在号码前加拨0 Sql 2012 远程数据库连接 DbEntry在Vs2012里的配置 终点,也是新的起点! 天气预报数据查询接口 关于浏览器账号的一个愿望 关于移动,联通,电信的区分。 - 五味果 - 博客园 被#号折腾了。 Orm 请别让数据库中的默认值形同虚设!! 利用反射,泛型,静态方法快速获取表单值到Model。 subsonic sqlite 路径问题 - 五味果 ORM是工具,工具是用来提高开发速度的。 基于XML的后台管理系统--设想 项模板的使用--提高编程速度 C#开发编码规范 IIS7下运行Access+Asp的解决方法
基于Jquery的内容显示模块 - 五味果 - 博客园
五味果 · 2008-04-23 · via 博客园 - 五味果

    最近在学习Jquery,看到好多网站的内容切换模块,也想用Jquery做一个。很简单。代码如下:

<!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>
    
<title>无标题页</title>
    
<script src="js/jquery-1.2.3-intellisense.js" type="text/javascript"></script>
  
<style type="text/css">
.menu
{ margin:0; padding:0; border:0; width:300px;}
.menu div
{ width:300px; height:200px; border-color:Red;  border-style:solid; border-width:1px; color:Red; float:left; display:none }
.menu ul
{  padding:0; margin:0; list-style-type:none; float:left;}
.menu li
{ width:70px; border-width:1px 1px 0px 1px; border-color:Red; border-style:solid; float:left;height:28px; margin-right:2px; text-align:center; line-height:28px; font-weight:bold;}
</style> 
<script type="text/javascript" language="javascript">
$(document).ready(
function(){
$(
".menu div:eq(0)").css("display","block")
$(
"li:eq(0)").css("background","#eee")
$(
"li").mouseover(function(index){
$(
"li").css("color","");
$(
this).css("color","red")
var tex=$(this);
$(
".menu div").css("dispaly","none");
for(k=0;k<$(".menu li").length;k++)
{
    
if($(".menu li:eq("+k+")").text()==tex.text())
    
{
        $(
".menu li").css("background","");
         $(
".menu li:eq("+k+")").css("background","#eee");
         
if(k<$(".menu div").length)
         
{
        $(
".menu div").css("display","none")
        $(
".menu div:eq("+k+")").css("display","block")
        }

    }

}

}
)
}
)
    
</script>
</head>
<body>
<div class="menu">
<ul><li>选项一</li><li>选项二</li><li>选项三</li><li>选项四</li></ul>
<div>我是选项一</div>
<div>我是选项二</div>
<div>我是选项三</div>
</div>
</body>
</html>

    感觉jquery非常的方便,实现一些小功能很容易。