我尝试使用子 div 执行多个 DIVS,单击时会打开文本 div。
请参阅此线程:
jQuery - 如何使用子 DIV 显示/隐藏多个 DIV
我遇到了麻烦。这是我的位置:
www.gehko.co.uk/rohithSK/upcoming_rohith_katbamna3.html
这是JavaScript:
<script type="text/JavaScript">
$(".map-box a").click(function(e) {
$("#areas > div").hide();
$(this.hash).show();
e.preventDefault();
});
$("#areas div").not("#london, #london div").hide();
</script>
继承人的html:
<div id="maps">
<div id="upcomingNewOne">
<div class="map-box"><a href="#london"><img src="images/paper4Normal.gif" border="0"/></a></div></div>
<div id="upcomingNewTwo">
<div class="map-box"><a href="#south-west"><img src="images/paper3Normal.gif" border="0"/></a></div></div>
<div id="upcomingNewThree">
<div class="map-box"><a href="#south-central"><img src="images/paper2Normal.gif" border="0"/></a></div></div>
<div id="upcomingNewFour">
<div class="map-box"><a href="#north"><img src="images/paper1Normal.gif" border="0"/></a></div></div>
</div>
<br /><br/>
<div id="areas">
<div id="f1">
<div></div>
<div>f1</div>
</div>
<div id="f2">
<div></div>
<div>f2</div>
</div>
<div id="f3">
<div></div>
<div>f3</div>
</div>
<div id="f4">
<div></div>
<div>f4</div>
</div>
</div>
任何人都可以帮忙吗?