Jquery Cycle - 如何从锚点创建链接
我正在使用这个 Jquery:
$('#<%=ModuleControl.ModuleContext.ModuleId%>_Rotator div.DNNModuleContent > div.Normal').after('<ul class="RotatorNav">').cycle({
fx: 'fade', //effect to apply to rotation
speed: 1000, // speed of the transition (any valid fx speed value)
timeout: 5000, // milliseconds between slide transitions (0 to disable auto advance)
pager: '#<%=ModuleControl.ModuleContext.ModuleId%>_Rotator .RotatorNav', //selector for rotator navigation
allowPagerClickBubble: true,
// callback fn that creates a navigation to use as pager anchor
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#">' + slide.title + '</a></li>';
}
});
在我的横幅容器中,我使用这两行来指定横幅和锚文本:
<a title="Twitter" target="_self" href="/Twitter/tabid/86/Default.aspx" re_target="_self">
<img alt="" src="/portals/0/Images/positie1/header-twitter.png" />
</a>
现在我希望在单击锚时有一个指向特定网页的超链接,而不是在单击时转到该特定横幅点击。
我认为它应该是 HTML 行中的内容,但我不太擅长,抱歉。有人帮忙吗?
I'm using this Jquery:
$('#<%=ModuleControl.ModuleContext.ModuleId%>_Rotator div.DNNModuleContent > div.Normal').after('<ul class="RotatorNav">').cycle({
fx: 'fade', //effect to apply to rotation
speed: 1000, // speed of the transition (any valid fx speed value)
timeout: 5000, // milliseconds between slide transitions (0 to disable auto advance)
pager: '#<%=ModuleControl.ModuleContext.ModuleId%>_Rotator .RotatorNav', //selector for rotator navigation
allowPagerClickBubble: true,
// callback fn that creates a navigation to use as pager anchor
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#">' + slide.title + '</a></li>';
}
});
And in my bannercontainer I'm using this two lines for specifying the banner and the anchor text:
<a title="Twitter" target="_self" href="/Twitter/tabid/86/Default.aspx" re_target="_self">
<img alt="" src="/portals/0/Images/positie1/header-twitter.png" />
</a>
Now I want to have a hyperlink to a specific webpage when clicking the anchor instead of going to that specific banner when clicking.
I think it should be something in the HTML line but I'm not that good, sorry. Someone any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
锚标记是一个链接,只需在
href
属性中指定url。An anchor tag is a link just specify the url in the
href
attribute.尝试删除:
try remove: