monsterlalala
2017-07-30 17:57
<!DOCTYPE html> <html> <head> <title></title> <script type="text/JavaScript" src="scripts/jquery-1.5.2.min.js"></script> <!--css code--> <style type="text/css"> #navigation div{ height:15 px; width:auto; /*border*/ border-left:2px solid black; border-top:2px solid black; border-bottom:2px solid black; /*margin padding*/ margin-right:0px; margin-left:0px; padding-left:5px; padding-right:5px; display:inline; float:left; /*shadow*/ box-shadow:3px 4px 2px black; } #e_last{ border-right:2px solid black; } .menuActive{ background-color: #6fa8dc; } </style> </head> <body> <!--html--> <div id="navigation"> <div class="menuActive">Home</div> <div >Tech blogs</div> <div >Life blogs</div> <div id="e_last">Email me</div> </div> <!--js code--> <script type=type="text/JavaScript"> //active menu $("#navigation div").click(function(){ var $this=$(this); $this.toggleClass("menuActive"); }); </script> </body> </html>
第42行错了
jQuery基础(三)—事件篇
89997 学习 · 625 问题
相似问题