很抱歉问了一个非常基本的问题,我对 jQuery 很陌生。我有以下一段 HTML
<!DOCTYPE html>
<html>
<head>
<title>Test Div</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
</head>
<body>
<nav>
<div id='menu'>
<img src='img/Navigation/home.png' title='Home' alt='' />
<img src='img/Navigation/info.png' id="aboutUs" title='About Us' alt='' />
<img src='img/Navigation/gallery.png' id="portfolio" title='Portfolio' alt='' />
<img src='img/Navigation/facebook.png' title='Follow us' alt='' />
<img src='img/Navigation/contact.png' id="contactUs" title='Contact Us' alt='' /> </div>
</nav>
<div style="clear:both"></div>
<div id="contactUs" style="height:300px; width:300px; background-color:#999; display:none;">Contact Us</div>
<div id="portfolio" style="height:300px; width:300px; background-color:#999; display:none;">Portfolio</div>
<div id="aboutUs" style="height:300px; width:300px; background-color:#999; display:none;">About Us</div>
</body>
</html>
我想在点击相应按钮时显示contactUs、portfolio和aboutUs Divs。
我在网上搜索了大量示例仍然无法使其工作。