Question

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

Was it helpful?

Solution

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top