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

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - 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入门者有所帮助..