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

Attaching functionality to the modal's trigger #30

Open
jasonmorehead opened this issue Dec 20, 2018 · 0 comments
Open

Attaching functionality to the modal's trigger #30

jasonmorehead opened this issue Dec 20, 2018 · 0 comments

Comments

@jasonmorehead
Copy link

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?

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