• Resolved wager

    (@wager)


    Hi,

    I’m hoping to make popups to open when visitors hover over that popup’s trigger. Is there a way to make this happen so that visitors don’t have to click?

    Also, if so, can I make the popup close when the visitor moves the cursor from the trigger instead of having to click to close?

    I am aware of the delayed open feature, but I’m wanting the popup to open only when a visitor hovers over the trigger.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @wager:

    Triggering a popup to open ‘on hover’, and closing them when the cursor stops hovering over a particular page element by default is not built into the plugin .

    I did consult with the plugin developer about your questions above, and the short answer is that the triggers could be customized to do what you want using pure JavaScript and the jQuery library. If you’re knowledgeable about and skilled in using JS and jQuery, then the following code snippet will make sense. You could use it as a starting point for your own experimentation to create the trigger. If you’re successful in building the trigger, you can even submit a pull request to the plugin Github repo managed by the developer.

    At any rate, use the following JS/jQuery to get you started on your ‘on_hover’ / ‘hover_off_close’ trigger:

    $(‘.hover-trigger’).on(‘hoverover’,
    function () { PUM.open(123); }).on(‘hoverout’,
    function () { PUM.close(123); });

    Where ‘123’ = the ID number of the popup (generated by the plugin when the popup is published.)

    • This reply was modified 8 years, 10 months ago by Robert Gadon.
    Thread Starter wager

    (@wager)

    @yogaman5020,

    Thank you the information. I’m not at all familiar with JavaScript or jQuery, unfortunately. Can you perhaps point me in the right direction to get me started?

    Any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hover Trigger’ is closed to new replies.