• Kevin, thanks for this great plugin.

    I was trying to extend it today and found that I had to change the source in class-frontend.php to get what I wanted.

    I wanted to reuse the modal if my visitor clicked on a “Subscribe” link. One complication is that the theme I am using made it difficult to access the link directly.

    So I thought I’d throw some quick JS together to get what I wanted. And it worked – once I made the _ouibounce object global by removing the VAR in front of the definition. I think there might be a better way to get at it though.

    I wonder if it might be possible to setup a custom javascript trigger when wbounce is setup to pass along the _ouibounce object. Then we can capture that custom event, and have our way with the object without it becoming “global”.

    regards,
    – Tom

    https://www.ads-software.com/plugins/wbounce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kevinweber

    (@kevinweber)

    Hi Tom,

    I’m not sure if this solves your issue, but it’s possible to use a “.fire()” function, as described here: https://github.com/carlsednaoui/ouibounce#ouibounce-api
    Can you solve your issue using .fire()?

    I plan to implement an option so you can add JavaScript without having to hard-code anything.

    Best regards,
    Kevin

    Thread Starter transom

    (@transom)

    I am using the fire() function but the ouibounce object isn’t within my scope. (using var _ouibounce = …..; within your jQuery function limits the scope).

    Once I remove the var preface, then the object is within the global scope and I can then use the api.

    I’ll see if I can cobble up an example how it might work and pass that along.

    Plugin Author kevinweber

    (@kevinweber)

    Is this issue still current to you?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Feature Request’ is closed to new replies.