sjosen
sjosen

Reputation: 561

Jquery Tooltip onShow function

I am trying to use a function inside the tooltip onShow event. I'm sure it's simple and straightforward but I just can't get it working. What am I missing here?

$("input[title]").tooltip({
    onShow: function() {
        $('.tooltip').css({'cursor':'crosshair', 'border-style':'dashed'}).click(function () {
            alert();
        });
    },
    offset: [120, 0]
});

http://jsfiddle.net/aya3C/1/

Thx in advance

Upvotes: 1

Views: 774

Answers (1)

A. Wolff
A. Wolff

Reputation: 74420

click() event is overrided by tooltip plugin. Try to use mousedown() instead.

See there: http://jsfiddle.net/aya3C/2/

Upvotes: 2

Related Questions