【发布时间】:2012-02-23 07:48:26
【问题描述】:
如何在同一个选择器和一个事件上调用两个函数并在它们之间传递数据? 第一个函数是 .hover
$("#cartItems tr.cItem").hover(
function ()
{
receipt = $(this).next().children().text();
//I want to pass receipt value to second function
},
function()
{
}
)
第二个功能是:
$("#cartItems tr.cItem").qtip(
{
content: receipt, // i need to pass it here
show: 'mouseover',
hide: 'mouseout'
});
它是在小窗口中弹出“contet”值的工具提示
如何调用/合并这两个函数?
【问题讨论】:
标签: javascript jquery events function call