Pregunta

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

¿Fue útil?

Solución

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

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top