Streaming live at 10am (PST)

Button that triggers a lightbox using scripts


#1

Hey there, I’m trying to trigger a lightbox with a button. I find this script:

$(document).ready(function() {
    $('#button-unique-id').click(function(e) {
        e.preventDefault();
        $('#lightbox-uniqe-id').trigger('tap');
    });
});

It was at Triggering a lightbox with a button

I try to replicate it but is not working for me. Here’s the public webflow: https://preview.webflow.com/preview/startupschool?preview=5713828787e83afadd6ce5a99ab581e0

Thank you!


#2

You opened a new script tag inside a script block, which is invalid.


Also, feel free to contact me for further code help and/or customization of third-party plugins