18 lines
403 B
JavaScript
18 lines
403 B
JavaScript
// initialize Foundation
|
|
$ (document).foundation ();
|
|
|
|
// bind some custom methods
|
|
$ (document).ready (function () {
|
|
$ ('.confirm').click (function () {
|
|
var confirmMessage = $ (this).data ('confirm-message');
|
|
|
|
// set some default message
|
|
if (typeof confirmMessage == 'undefined') {
|
|
confirmMessage = 'Really?';
|
|
}
|
|
|
|
var confirmation = confirm (confirmMessage);
|
|
|
|
return confirmation;
|
|
});
|
|
}); |