我使用qtip2通过这种方式在我的图片上方显示messagebox:
$('#july').qtip({
content: {text: $('div#messages_box div.message_july')},
show: {event: 'click', delay: 0},
hide: {event: 'unfocus'},
position: {my: 'left center', at: 'right center', target: '#july'},
style: {classes: 'ui-tooltip-rounded ui-tooltip-mine ui-tooltip-shadow', width: '350px', tip: {width: 20, height: 15}}
});在火狐,IE7,IE9它工作得很好,但IE8我必须等待5-6秒才能在点击后显示它。
有谁有解决这个问题的办法吗?
谢谢
发布于 2012-06-20 04:46:39
我找到了一个解决方案:在jQuery元素中,只需添加.html()。通过这种方式,我们获得了所有节点内容作为消息,并丢失了节点,但它的显示速度变得非常快。
$('#july').qtip({
content: {text: $('div#messages_box div.message_july').html()},
show: {event: 'click', delay: 0},
hide: {event: 'unfocus'},
position: {my: 'left center', at: 'right center', target: '#july'},
style: {classes: 'ui-tooltip-rounded ui-tooltip-mine ui-tooltip-shadow', width: '350px', tip: {width: 20, height: 15}}
});谢谢
https://stackoverflow.com/questions/11107089
复制相似问题