Closed lemagnetic closed 8 years ago
Firstly, callback are on $(document) (the descendants of the selected elements .remodal), not on the remodal instance... (Read the doc ...).
$(document).on('opened', '.remodal', function () {
console.log('Modal is opened');
});
The plugin return remodal instance, so you can call public method.
In the jquery documentation : The .on() method attaches event handlers to the currently selected set of elements in the jQuery object
If you want to keep your code :
var remodalInst = $('.remodal').remodal();
$(document).on('opened', '.remodal', function () {
callback();
});
I would like to do this:
or this
:/