meteor-sweetalert
meteor-sweetalert copied to clipboard
Template for sweet alert?
Being that we can insert html into the Sweet Alert, I was wondering if there was a template that the Sweet Alert is being used in so that I can make some custom event handlers for clickable text in the modal.
Looking to do something like:
Template.Example.events({
'click #do-something': function() {
htmlText = "I want to do something when I click <span id='click-me'>here</span>.";
swal({
title: "Example",
text: customText,
confirmButtonColor: "#2e9bda",
confirmButtonText: "Ok",
closeOnConfirm: true,
html:true
});
}
});
Template.SweetAlert.events({
'click #click-me': function() {
swal.close();
// do other cool stuff here...
}
})