jquery show()正在工作,而toogle()不工作
jquery show()方法正在工作,但toogle()不工作。为什么jquery show()正在工作,而toogle()不工作,jquery,show,show-hide,Jquery,Show,Show Hide,jquery show()方法正在工作,但toogle()不工作。为什么 <!DOCTYPE html> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <style> .past{height:100%} .past ul{list-style:none;float:left} .past li{float:left} .past .he{dis
<!DOCTYPE html>
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
.past{height:100%}
.past ul{list-style:none;float:left}
.past li{float:left}
.past .he{display:block;background:#eee;padding:10px;color:#3d3d3d;text-decoration:none;
margin-left:5px;
}
.past .he:hover{background:#fff}
.past ul ul{float:none;margin:0;padding:0;position:absolute}
.past li li{float:none;margin:0;padding:0}
.past .sub{background:#EDEDED;padding:7px;color:#3d3d3d;text-decoration:none;display:block;
border-bottom:1px solid #ccc;
margin-left:5px;
}
.past .sub:hover{background:#F7F7F7}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div class="past">
<h1 class="lcolh">Midterm Term Past Papers & MCQs</h1>
<ul><li><a href="javascript:;" id="41" class="he"> CS501 </a><script>
$( "#41" ).click(function() {
$( "#41DIV" ).toogle();
});
</script><ul id="41DIV" style="display:none">
<li><a href="http://vubscs.com/thread-49.html" class="sub">CS501 Midterm Solved Subjective With References by Moaaz</a></li></ul></li><li><a href="javascript:;" id="37" class="he"> CS504 </a><script>
$( "#37" ).click(function() {
$( "#37DIV" ).toogle();
});
</script><ul id="37DIV" style="display:none">
<li><a href="http://vubscs.com/thread-52.html" class="sub">CS504 Solved Midterm MCQs with Reference</a></li>
<li><a href="http://vubscs.com/thread-54.html" class="sub">CS504 Midterm Solved MCQs and Subjectives Mega file</a></li></ul></li>
</ul>
</div>
<br/>
<br/>
<br/>
<br/>
<br/>
</body></html>
.过去{身高:100%}
.pass ul{list style:none;float:left}
.过去李{浮动:左}
.pass.he{显示:块;背景:#eee;填充:10px;颜色:#3d3d;文本装饰:无;
左边距:5px;
}
.过去.他:悬停{背景:#fff}
.pass ul ul{浮点:无;边距:0;填充:0;位置:绝对}
.pass li li{浮点:无;边距:0;填充:0}
.pass.sub{背景:#eded;填充:7px;颜色:#3d3d;文本装饰:无;显示:块;
边框底部:1px实心#ccc;
左边距:5px;
}
.pass.sub:悬停{背景:#F7F7F7}
期中期末论文和MCQ
-
$(“#41”)。单击(函数(){
$(“#41DIV”).toogle();
});
-
$(“#37”)。单击(函数(){
$(“#37DIV”).toogle();
});
它应该是$(“#您的id”)。toggle()代码>非.toogle()代码>因为它是.toggle()
?“编程”时,拼写很重要.toggle()
和“程序员”。@Sparky672和ethorn10 lol谢谢你:)