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

Support: Read data from clicked element #260

Open
solepixel opened this issue Sep 14, 2016 · 2 comments
Open

Support: Read data from clicked element #260

solepixel opened this issue Sep 14, 2016 · 2 comments

Comments

@solepixel
Copy link

solepixel commented Sep 14, 2016

Is it possible to load content dynamically into the modal using the "opening" event by reading information from the clicked element? I'm trying to use:

$(document).on('opening', '.remodal', function(e) {
    console.log(e);
});

However e doesn't seem to have the element that was clicked. e.target appears to be the actual modal. Any way to grab the clicked element?

If not, what's the best way to pass data into the modal for loading?

@AlexPashley
Copy link

AlexPashley commented Oct 12, 2016

+1

I have a list of records in a table. I would like to dynamically pass data or get the clicked element so I can identify which row to delete.

@solepixel
Copy link
Author

I ended up accomplishing this by creating the modal dynamically from the click event of the source element, but I think passing the clicked element into the opening callback would be a much more elegant solution.

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

2 participants