I've got a modal where I'm trying to get information and/or manipulate the modal's trigger (like add a class to it). In the modal's JS, I have a line that looks like this:
This line attaches the "foo" class to the modal element when the modal is triggered.
Based on this, I thought I could do something similar to add the "foo" class to the triggering element, like so:
However, this generates the following error:
Uncaught TypeError: hash.t.addClass is not a function
Is there a way to manipulate the modal's trigger, or perform other jQuery functions on it, like get the value of any "data" attributes that it might have?
I've got a modal where I'm trying to get information and/or manipulate the modal's trigger (like add a class to it). In the modal's JS, I have a line that looks like this:
This line attaches the "foo" class to the modal element when the modal is triggered.
Based on this, I thought I could do something similar to add the "foo" class to the triggering element, like so:
However, this generates the following error:
Is there a way to manipulate the modal's trigger, or perform other jQuery functions on it, like get the value of any "data" attributes that it might have?