开发者

How do I disable an EZPZ tooltip mouseover event in jquery?

开发者 https://www.devze.com 2023-01-17 22:00 出处:网络
I\'m working on a site which uses the EZPZ tooltip jquery plugin, and I have the style of the page changing dramatically when a button is clicked, making the tooltip pointless.

I'm working on a site which uses the EZPZ tooltip jquery plugin, and I have the style of the page changing dramatically when a button is clicked, making the tooltip pointless.

But, I can't for the life of me figure out how to unbind the event from the <li>. Here's th开发者_高级运维e code that is used to actually set up the tooltip on the li's:

var ttObj = $('.listView span');
var ttArr = jQuery.makeArray(ttObj);
$.each(ttArr, function (key, value) {
    var positionTip = "rightStatic";
    if (IS_IE7) {
        positionTip = "rightStaticIE";
    }
    $(value).ezpz_tooltip({
        contentPosition: positionTip,
        stayOnContent: true,
        offset: -495
    });
});

Any help would be greatly appreciated. Thanks.


Hm, your code suggests the events aren't bound to li-element but to span-elements.

Assuming that's correct, you should do this in your button click handler:

$('.listView span')
  .unbind('mouseover')
  .unbind('mouseout')
  .unbind('mousemove');

Note, though, that this unbinds all handlers for those events, not just the ones bound by ezpz. It might be possible to unbind them all in one call in jQuery 1.4.2, like so:

$('.listView span').unbind('mouseover mouseout mousemove');
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号