Created
September 23, 2015 06:14
-
-
Save hiraq/733c543dbab7e46ec81d to your computer and use it in GitHub Desktop.
simple jquery plugin for window confirm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
(function($) { | |
$.fn.confirmit = function(msg, successFunc) { | |
if (window.confirm(msg)) { | |
successFunc(); | |
} | |
return this; | |
}; | |
}(jQuery)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example: