Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1418033

    Hi Enfold-team,

    I have a question about the ‘Image with hotspots’ element. There are three options for displaying tooltips: on mouseover, always, or ‘show on mouseover, hide on click.’ In the latter case, however, you must click directly on the respective hotspot to close the tooltip. Is it possible to make it so that you can click anywhere on the page to close the tooltip?

    Thanks in advance!

    Ita

    #1418117

    Hey Frans,

    Thank you for the inquiry.

    This is possible but you have modify one of the script files directly. Please check the following threads for more info.

    // https://kriesi.at/support/topic/close-a-hot-spot-by-clicking-anywhere-away-from-it/#post-1277247
    // https://kriesi.at/support/topic/image-hotspot-tooltips-with-click-again-again-2018/#post-1025216

    Best regards,
    Ismael

    #1419583

    Hi Ismael,

    I’m sorry it took so long, but I had to wait for the customer…I’ve tried both options, but unfortunately, I’m not getting the desired result.

    // https://kriesi.at/support/topic/close-a-hot-spot-by-clicking-anywhere-away-from-it/#post-1277247
    Have I placed the additional code correctly? (see screenshot)

    // https://kriesi.at/support/topic/image-hotspot-tooltips-with-click-again-again-2018/#post-1025216
    I have also applied this, but unfortunately, no result.

    As you can see in the link mentioned in the private content, the popup window only closes when you click on a hotspot. Is there another solution?

    #1419638

    Hi,

    Thank you for the update.

    Have I placed the additional code correctly? (see screenshot)

    You have to add the code below the first block.

    if (this.options.event != 'click')
                    {
                        this.scope.on('mouseleave', default_tooltips, $.proxy(this.hide_tooltip, this));
                        this.scope.on('click', default_tooltips, $.proxy(this.hide_on_click_tooltip, this));
                    } else
                    {
                        this.body.on('mousedown', $.proxy(this.hide_tooltip, this));
                    }
    
                    this.body.on('click', $.proxy(this.hide_all_tooltips, this));
    

    You have to temporarily disable the Enfold > Performance > File Compression settings after doing the modification.

    Best regards,
    Ismael

    #1419678

    Hi Ismael,

    Thank you very much for your answer. I started over again with a fresh avia.js-file in the Enfold -folder and put “this.body.on(‘click’, $.proxy(this.hide_all_tooltips, this));” on rule no 1473.

    Btw: In my code, I see ‘.bind’, in your code I don’t. Does that make a difference?

    Btw2: Enfold > Performance > File Compression was already disabled, indeed (see screenshot).

    Could you please take another look why the code is not working on this website?

    Thanks,
    Ita

    #1419818

    Hi,

    Thank you for following up.

    We may need to login to the site in order to properly test the modification. Please provide the login details in the private field.

    Best regards,
    Ismael

    #1419837
    This reply has been marked as private.
    #1419888

    Hi,

    Thank you for the info.

    Instead of editing the avia.js file, we just added this script in the functions.php file.

    function av_hide_show_tooltips (){ ?>
        <script>
    	(function( $ ) {
    		$('body').on( "click", function(e) {
    			$(this).children('.avia-tooltip').hide();
    		});
    	})(jQuery);
        </script>
    <?php }
    add_action('wp_footer', 'av_hide_show_tooltips');

    This should hide all active tooltip when you click anywhere in the document.

    Best regards,
    Ismael

    #1419939

    Hi Ismael,

    This works great! Exactly what the client was looking for. Thanks a lot!!

    Cheers,
    Ita

    #1419945

    Hi,
    Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Image with hotspots; close onclick’ is closed to new replies.