You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
hash.w.addClass('foo');
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:
hash.t.addClass('foo');
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: