将 onRelease 与 sIFR 结合使用
如何在 sIFR 中捕获 onclick 事件? 我知道我应该使用 onRelease
,但无法弄清楚如何。 我一直在寻找一种将其与 jQuery ui 选项卡结合使用的解决方案,这是通过此函数触发的:
$(function() {
$("#tabs").tabs();
});
我尝试过像这样简单地插入它,显然没有任何运气:
sIFR.replace(AkzidGroLight, {
selector: '#tabsNav h4.Berthold-light',
onRelease: function(fi) { $('#tabs').tabs(); },
css: [
'a {text-align: center; display: block; text-decoration: none; letter-spacing: -0.5;}',
'a:link { color: #333333; }' ,
'a:hover { color: #999999; }'
],
offsetTop: 5,
tuneHeight: 5,
wmode: 'transparent'
});
How do I catch onclick events in sIFR? I know I'm meant to use onRelease
, but can't figure out how. I've been looking high and low for a solution to use it in combination with jQuery ui tabs, which is triggered with this function:
$(function() {
$("#tabs").tabs();
});
I've tried simply inserting it like this, obviously without any luck:
sIFR.replace(AkzidGroLight, {
selector: '#tabsNav h4.Berthold-light',
onRelease: function(fi) { $('#tabs').tabs(); },
css: [
'a {text-align: center; display: block; text-decoration: none; letter-spacing: -0.5;}',
'a:link { color: #333333; }' ,
'a:hover { color: #999999; }'
],
offsetTop: 5,
tuneHeight: 5,
wmode: 'transparent'
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
wmode 透明是 buggy buggy buggy。 首先删除它,看看行为是否发生变化。 以防万一您的回调出现问题,请在其中添加警报或 console.log 以确保它确实被调用。
wmode transparent is buggy buggy buggy. Start by removing that and see if the behavior changes. Just in case your callback has a problem, put an alert or console.log in there to make sure it's actually getting called.