Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow other elements than <a> to trigger the overlay #253

Open
c0necto opened this issue Apr 14, 2022 · 1 comment
Open

Allow other elements than <a> to trigger the overlay #253

c0necto opened this issue Apr 14, 2022 · 1 comment

Comments

@c0necto
Copy link

c0necto commented Apr 14, 2022

I would like to trigger the overlay from different elements and with attributes other than just href. For example, I'd like to open the overlay with this button: <button data-src="my-image.jpg">Show Overlay</button>.

I think this could be achieved without much code and without BC breaks by adding two configuration options triggerSelector and srcAttribute which would default to a and href, respectively.

@Andrew-web-coder
Copy link

I think you will need to look for alternatives, like Fancybox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants