Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ouibounce without dummy object? #30

Closed
9mm opened this issue May 11, 2014 · 6 comments
Closed

Use ouibounce without dummy object? #30

9mm opened this issue May 11, 2014 · 6 comments

Comments

@9mm
Copy link

9mm commented May 11, 2014

I want to have full control over what happens on exit (my own modal code, etc).

Right now I have to just make a dummy object, and put my regular code in the callback. Maybe we could just have something like calling ouibounce() on false will still trigger callbacks but wont try to mess with any elements?

@carlsednaoui
Copy link
Owner

Hey travis, small world — I'm a big fan of pineapple.io (I created http://coursebacon.com/ way back when I was learning rails!).

I'm not sure I understand what you're trying to achieve — why would you call ouibouce on false? If you're trying to show a modal using ouibounce you def need to select an element (which ouibounce will then show).

All you're getting with ouibounce is the trigger — based on the mouseout event. You have full control over what happens on exit (which element you show, etc).

@9mm
Copy link
Author

9mm commented May 11, 2014

Hey man, thats awesome! :)

Er, as for my question that was just a (probably awful) idea. Basically, I just would like to benefit from the outbounce API for when the user's mouse is leaving the page, but without ouibounce actually triggering a popup (I use this modal plugin for example).

What I currently do is create a blank dummy object, then place my vex modal code in callback: function() {}. It would just be cool to do that without having to create a dummy object.

@carlsednaoui
Copy link
Owner

Ohh, I see. That's a neat use case!

Not sure if there's an easy way to add that in right now but pull requests are always welcome :)

@Jenius: any ideas on this?

@9mm
Copy link
Author

9mm commented May 12, 2014

Instead of blowing you up with new issues, I'm just wondering if it's easy to let ouibounce work with IE8?

I get Object doesn't support property or method 'addEventListener'.

If not it's not a big deal I don't think... I do think this is an awesome plugin!

@carlsednaoui
Copy link
Owner

Thanks for the heads up — that's a problem. Just opened up a new issue for it 👍

@carlsednaoui
Copy link
Owner

@9mm, just added this — let me know if it works for you. (I also updated the README :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants