• Resolved johnny_n

    (@johnny_n)


    Hi Phil —

    Using v3 (we just updated), our nav is showing ‘behind’ the age gate. This wasn’t the case with V2. I tried using age_gate_shown, the listener is added (I see mine in dev tools along with yours) but it never fires. Currently code is there to hide the nav and display an alert but nothing happens (the alert is for testing).

    This is the function in stockyards.js straight out of your knowledgebase:

    window.addEventListener('age_gate_shown', function () {
    	alert('working');
    	$('#navigation').hide();
    });

    There might be a better way to accomplish this too, if so I’m all ears —

    Thank you! ??

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @johnny_n,

    That’s interesting. It definitely fires as I use it internally for some of the features, will have a dig and see if I can figure out why. Probably some load order or something.

    But; I think we can massively simplify things for your need and just whack up the z-index for age gate. It is a bit lower by default in v3 to be fair.

    If you add this to your css you should be good:

    
    :root {
        --ag-form-z-index: 10001;
    }
    

    That is literally 1 higher than default and seems to do the job! Crank it up if it doesn’t for you.

    Thanks
    Phil

    Thread Starter johnny_n

    (@johnny_n)

    Hi @philsbury, thank you for the quick reply!

    Yes, indeed – that is a far better solution and works perfectly… I appreciate it! ??

    All the best,
    john.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘age_gate_shown not firing?’ is closed to new replies.