Skip to content

Instantly share code, notes, and snippets.

@krishna19
Forked from mjangda/widget-post-save.js
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krishna19/98c5bb8fd84289cc8b83 to your computer and use it in GitHub Desktop.
Save krishna19/98c5bb8fd84289cc8b83 to your computer and use it in GitHub Desktop.
jQuery(document).ajaxSuccess(function(e, xhr, settings) {
var widget_id_base = 'mywidget';
if(settings.data.search('action=save-widget') != -1 && settings.data.search('id_base=' + widget_id_base) != -1) {
alert('yay!');
// do other stuff
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment