This example shows how to speak a message when the user moves to exit the page.
Move your mouse to the browser URL bar to hear this in action.
This is example code to add just before the closing body tag.
1 2 3 4 5 6 7 8 9 |
<script> $(document).on('mouseleave', exitIntent); function exitIntent(e){ if( e.clientY < 0 ) { responsiveVoice.cancel(); responsiveVoice.speak('Want a free talking avatar for your website, check out bring to life three di speaking characters','Dutch Female'); } } </script> |
Keywords: exit intent message