FEATURE: add confirmation for all elements with class "confirm"
This commit is contained in:
@@ -1 +1,18 @@
|
||||
$(document).foundation();
|
||||
// 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;
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user