• Resolved politicske

    (@politicske)


    Google Chrome’s inspect element returns the following error in the console `Uncaught ReferenceError: exitpopup is not defined
    at (index):119`

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

    (@nimonogi)

    I can’t reproduce this error. Please provide your wordpress site to have a look.

    Tanay

    (@tanaykhandelwal-1)

    I also got the same problem and fixed by wrapping the code into exit-popup.php ( moved line 196 to 187 )
    Previous code

    
    <script type='text/javascript'>
    var _exitpopup = exitpopup(document.getElementById('exitpopup-modal'), {
            aggressive: true,
            timer: 0,
    		sensitivity: 20,
    		delay: 0,
            sitewide: true,
    		cookieExpire: <?php echo esc_attr( get_option('exit_popup_cookie_expire') ); ?>,
            callback: function() { console.log('exitpopup fired!'); }
          });
    jQuery(document).ready(function($) {
    ...
    

    Updated Code will look like

    
    <script type='text/javascript'>
    jQuery(document).ready(function($) {
    	var _exitpopup = exitpopup(document.getElementById('exitpopup-modal'), {
            aggressive: true,
            timer: 0,
    		sensitivity: 20,
    		delay: 0,
            sitewide: true,
    		cookieExpire: <?php echo esc_attr( get_option('exit_popup_cookie_expire') ); ?>,
            callback: function() { console.log('exitpopup fired!'); }
        });
        ...
    

    Note: It’s not recommended to customise in plugin file on update your customisation will lost.

    Thanks!

    • This reply was modified 5 years, 9 months ago by Tanay.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error’ is closed to new replies.