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

how to select the clicked element with "data-featherlight" if there are more than one? #425

Open
musicjunk opened this issue Feb 15, 2022 · 0 comments

Comments

@musicjunk
Copy link

musicjunk commented Feb 15, 2022

Is there a way to select the element (button) that opend the lightbox?
I've several buttons to open the lightbox always with the same content.

<div class="div1">AAA</div>
<button><a class="" data-featherlight="#modalForm" >open 1</a></button>
</div>
<div class="div1">BBB</div>
<button><a class="" data-featherlight="#modalForm" >open 2</a></button>
</div>

Now I want to add the Text "AAA" or "BBB" to the content of #modalForm.
To select the right one, I need to know witch button was clicked. How can $(this) button be selected?

I've testet with current but I guess this holds the opend lightbox not $(this) clicked button.

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

1 participant