【发布时间】:2011-10-12 08:38:18
【问题描述】:
我想使用以下脚本创建 Mootools ajax 工具提示
new MooTooltips({
extra:{
0: {
'id':this.id,
'ajax':'http://www.fesn.cz/communities/tip.php',
'ajax_message': 'Loading... please wait.',
'position':1,
'sticky':false
}
},
ToolTipClass:'ToolTips', // tooltip display class
toolTipPosition:-1, // -1 top; 1: bottom - set this as a default position value if none is set on the element
sticky:false, // remove tooltip if closed
fromTop: 0, // distance from mouse or object
fromLeft: -55, // distance from left
duration: 300, // fade effect transition duration
fadeDistance: 20 // the distance the tooltip starts the morph
});
}
脚本演示在这里,
http://jsfiddle.net/kyathi/mHEjV/.
背后的想法是当 mouseenter 每个可提示的类都会显示一个 ajax 工具提示。但是当鼠标悬停在div上时,脚本第一次调用ajax脚本失败,之后会调用。
有解决错误的想法吗?
谢谢
【问题讨论】:
标签: javascript ajax mootools mootools-events