Pergunta

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

Foi útil?

Solução

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

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top