Title: Adding close button to tooltips
Last modified: October 30, 2019

---

# Adding close button to tooltips

 *  Resolved [rowanms](https://wordpress.org/support/users/rowanms/)
 * (@rowanms)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/adding-close-button-to-tooltips/)
 * In the tooltip, I have added a close class
 * <div class=”float-right clickable closeme”>x</div>
 * And in custom js I have added the following code
 * $(this).closest(‘div.imgl-tooltip-wrap’).removeClass(‘imgl-show’).addClass(‘imgl-
   hide’);
 * This hides the open tooltip, however it does not trigger the correct event as
   I then need to click the hotspot twice in order to open it again.
 * How can I manually trigger the tooltip close event?

Viewing 1 replies (of 1 total)

 *  Thread Starter [rowanms](https://wordpress.org/support/users/rowanms/)
 * (@rowanms)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/adding-close-button-to-tooltips/#post-12079631)
 * This sorted out my problem
 * $(‘.closeme’).on(‘click’, function(){
    $(“body”).trigger(“click”); });

Viewing 1 replies (of 1 total)

The topic ‘Adding close button to tooltips’ is closed to new replies.

 * ![](https://ps.w.org/imagelinks-interactive-image-builder-lite/assets/icon-256x256.
   png?rev=2015249)
 * [ImageLinks - Interactive Image Builder](https://wordpress.org/plugins/imagelinks-interactive-image-builder-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/imagelinks-interactive-image-builder-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/imagelinks-interactive-image-builder-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/imagelinks-interactive-image-builder-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/imagelinks-interactive-image-builder-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/imagelinks-interactive-image-builder-lite/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [rowanms](https://wordpress.org/support/users/rowanms/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/adding-close-button-to-tooltips/#post-12079631)
 * Status: resolved