vodkabears / Remodal

No longer actively maintained.
http://vodkabears.github.io/remodal/
MIT License
2.75k stars 771 forks source link

Callback function? #212

Closed harisb closed 8 years ago

harisb commented 8 years ago

I've searched and couldn't find anything about having a callback function. I know I can have an event listener to listen when the remodal opens or closes, but I want to have a callback function on the initial link that called the remodal box so that I don't lose the association and that way I could also access data attributes for the initial link too.

For example:

$('[data-remodal-id=edit-website]').remodal(options, function() {
// extra stuff goes here...
});
harisb commented 8 years ago

I've been able to pre-populate the fields I needed using jQuery's on method, but it would really be much nicer if Remodal supported some way of passing custom variables to the modal windows.

So in other words, the link that launches the Remodal could pass on the data, or one Remodal could pass data to another Remodal.