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

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - fanrsh

Javascript's Event 的一点总结 [转]SQL Server2005 SQLCLR代码安全之权限(3) [转]SQL Server2005 SQLCLR代码安全之权限(2) [转]SQL Server2005 SQLCLR代码安全之权限(1) Remoting事件序列一:客户端触发服务器端事件 jQuery工作原理解析以及源代码示例 ASP.NET 页面生存周期概览 推荐一个快速反射调用的类 Visual Studio 2005的版本情况和新特征详细介绍 Creating and writing ASP.NET 2.0 custom Configuration Sections 给大家一个CSS编辑工具,结合JQUERY用的很爽啊 flv视频是如何转的? codesmith学习资源 asp.net 事件验证 CSS循序渐进系列 [更新中]Lucene.net,中文分词技术 ICTCLAS研究 .net sql连接字符串详解 socket专家好文收藏 jQuery学习资源
jquery入门1:简单收缩菜单 - fanrsh - 博客园
fanrsh · 2007-09-10 · via 博客园 - fanrsh

HTML代码:

<!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>Untitled Page</title>
<link rel="stylesheet" href="css.css" type="text/css">
<script src="jquery-1.1.4.js"></script>
</head>
<script>
$(document).ready(
function()
$(
"div.menu2").css("display","none");

$(
"div.menu1").click( function() { $(this).children('.menu2') .slideToggle("slow");} );

$(
"div.menu2").click( function() { alert(this.getAttribute("href")); return false;});

}
);
</script>
<body>
<div class="menu1">
1
<div class="menu2" href="123.htm">1-1</div>
<div class="menu2" href="123.htm">1-2</div>
<div class="menu2" href="123.htm">1-3</div>
<div class="menu2" href="123.htm">1-4</div>
</div>


<div class="menu1"> 
2
<div class="menu2">2-1</div>
<div class="menu2">2-2</div>
<div class="menu2">2-3</div>
<div class="menu2">2-4</div>
</div>


<div class="menu1">
3
<div class="menu2">3-1</div>
<div class="menu2">3-2</div>
<div class="menu2">3-3</div>
<div class="menu2">3-4</div>
</div>
</body>
</html>

CSS代码:

.menu1{background-color : #FFFDA0;
}


.menu2
{background-color : #C4BCFF;

}

代码很简单,我就不描述了//希望对jquery入门者有所帮助..