humaan / Modaal

An accessible dialog window library for all humans.
http://humaan.com/modaal/
MIT License
2.72k stars 183 forks source link

How do I know which element called the function? #145

Open t7m opened 2 months ago

t7m commented 2 months ago

Your documentation shows this:

$('.my-link').modaal({ before_open: function() { alert('Before open'); }, after_open: myFunction });

Great. So what I want to do is in the before_open function, some specific logic based on which element was clicked. What is that element? How can I get to it? It does not appear to be $( this )