我搜索了所有,并没有找到我的特定问题的答案。如何从图像映射href激活jquery手风琴?
我有一个简单的jquery手风琴,我希望能够从内部链接激活一个特定的部分。该链接来自图像地图,因此观看者点击图像的某个区域并激活手风琴的该部分。似乎很简单,但我有一段时间与它。
因此,例如我到目前为止有:
$(function() {
$("#myaccordion").accordion({
active: false,
autoHeight: false,
navigation: true
});
});
<img src="Map.png" name="map" width="650" height="336" usemap="#hotspot" id="mymap" />
<map name="hotspot" id="hotspot">
<area shape="poly" coords="251,125,241,181,287" href="#section1" target="_self" alt="section1" />
<area shape="poly" coords="155,223,133,194,96" href="#section2" target="_self" alt="section2" />
</map>
<div id="myaccordion">
<h3><a href="#section1">Section 1</a></h3>
<div>
<p>
Section 1 content
</p>
</div>
<h3><a href="#section2">Section 2</a></h3>
<div>
<p>
Section 2 content
</p>
</div>
我知道基于什么我已经能够找到这段代码是长的路,从什么它需要,但是这是最我现在可以弄清楚。
我已经能够基于其他线程得到最接近的是使用href#从外部链接激活一个部分,但我需要这种情况发生而无需重新加载页面。
这很好。谢谢! – Justin 2011-03-25 05:57:54