Skip to content

Instantly share code, notes, and snippets.

@mintindeed
Created June 13, 2013 21:56
Show Gist options
  • Save mintindeed/5777729 to your computer and use it in GitHub Desktop.
Save mintindeed/5777729 to your computer and use it in GitHub Desktop.
jQuery(':button, :submit, #post-preview, .submitdelete', '#submitpost').each(function(){
var t = jQuery(this);
if ( t.hasClass('button-primary') )
t.addClass('button-primary-disabled');
else
t.addClass('button-disabled');
t.prop('disabled', true);
t.on('click', function() {
alert("Are you sure?");
} );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment