Is there any way in jquery clueTip to have the escape key close a sticky tooltip?

302 views Asked by At

i am using jquery cluetip and it works great. I have it in sticky mode so i can hover over the tooltip and click on links, etc.

The one gap i have is that its a bit annoying to have to mouse click on the uppoeer right to close the cluetip . Is there anyway to simply hit the escape key and have the close the cluetip? I would expect that behavior to come out of the box but i dont see it.

1

There are 1 answers

0
ShankarSangoli On BEST ANSWER

You can try something like this.

$(document).keydown(function(e) {
    // ESCAPE key pressed
    if (e.keyCode == 27) {
        //Code here to close the tooltip
        $(document).trigger('hideCluetip');
    }
});