• Hi,

    I want to set Window level variable while user click on Accept button.

    For example code – Window.varABC = [1];

    Where can i add this code?

    I already analysed and checked “Script blocking” functionality. It’s not do anything while user Click on accept button. Its just run script code, after reload the page.

    I already checked “cookie-notice/js/front.js” file. That handles the Accept button click event. As below, I try to put my above code in file but it didn’t work.

    // handle set-cookie button click
    $( document ).on( ‘click’, ‘.cn-set-cookie’, function ( e ) {
    e.preventDefault();

    Window.varABC = [1]; // my code

    $( this ).setCookieNotice( $( this ).data( ‘cookie-set’ ) );
    } );

    Please can you guide me for above query.

    Regards,

  • The topic ‘Set Window Variable While Click On Cookie Accept Button’ is closed to new replies.