如何在點擊觸發器<a href="http://example.com" target="_blank">
上點擊<div class="hover"></div>
?我已經使用兄弟選擇試過,我似乎無法得到它的竅門..jQuery Div OnClick觸發兄弟連接
當有人點擊div.hover我需要一個新的窗口中使用兄弟錨的href打開。
<ul id="photoUL">
<li>
<div class="hover"></div>
<a href="http://example.com" target="_blank">
<img width="150" height="150" style="border: 1px solid #000000;" title="2013 Dirty Duathlon" src="http://example.com/example.jpg">
</a>
<a href="http://example.com" target="_blank">EXAMPLE</a>
</li>
你想要什麼?請解釋併發布你的js代碼。 –
觸發點擊不會觸發錨的原生行爲! – tymeJV
你是否試圖將網頁地址更改爲example.com? –