Skip to content

Instantly share code, notes, and snippets.

@jetsanix
Created January 17, 2014 15:02
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 jetsanix/8474818 to your computer and use it in GitHub Desktop.
Save jetsanix/8474818 to your computer and use it in GitHub Desktop.
count = 0;
jQuery(".time").each(function(){
var $t = jQuery(this);
var $del = $t.parent().parent().find('a.delete');
jQuery.ajax({
type: 'POST',
url: location.href,
data: {
action: 'msg.del',
msg: $t.attr('ffid'),
token: $del.attr('token'),
ajax: 'yes',
},
dataType: 'json',
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function(data) {
if(count==16) location.reload();
},
error: function(data) {
if(count==16) location.reload();
}
});
});
setTimeout(function(){ location.reload()}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment