我在其中一个按钮上使用了外部链接,当单击按钮文本时它没有将我带到该链接。有谁知道如何解决这一问题?
jsFiddle:http: //jsfiddle.net/jetlag/Bjp5j/
HTML 标记:
<div class="top button-area">
<div class="button button1">
<div class="button-text">Button 1</div>
</div>
<div class="button button2">
<div class="button-text"><a href="http://jquery.malsup.com/cycle/" target="_blank">Button 2</a></div>
</div>
</div>
<div class="image-area">
<div class="image-section">
<div class="image">
<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" />
</div>
</div>
<div class="image-section">
<div class="image">
<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" />
</div>
</div>
</div>
jQuery:
var $this = $('.image-area');
$this.cycle({
fx: 'fade',
speed: 'fast',
timeout: 3000,
pager: $this.parent().find('.button-area'),
pauseOnPagerHover: true,
pagerEvent: 'mouseover',
pagerAnchorBuilder: function (idx, slide) {
return $this.parent().find('.button-area .button:eq(' + idx + ')');
}
});