What closed a foundation modal in closed event?

Using Foundation 5 modal dialogs. Is there a way to pass what fired the close event. Like a button or a link? Something like this. I tried using the data attribute but that doesn’t seem to work.

$('#cancelbutton').on('click',function() { 
$(document).on('closed.fndtn.reveal', '[data-reveal]', function (e) {
     var closer = e.data;

Source: jquery

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.