var $j = jQuery.noConflict(); function lt_like(id){ /* var post_id = id; $j('.loader-' + id).ajaxStart(function() { $j(this).show(); }); $j('.loader-' + id).ajaxStop(function() { $j(this).hide(); });*/ var post_url = "/radikal2/wp/wp-content/plugins/likethis/functions.php"; $j.ajax({ beforeSend: function(){ $j('.loader-' + id).show(); }, type: 'POST', url: post_url, data: 'id='+id, success: function(data) { if (data.indexOf("error") == -1) { var nums = $j('.like-num-' + id).html(); parseInt(nums); nums++; $j('.like-num-' + id).html(nums); $j('.like-link-' + id).click(function() { return false; }); } else { $j('.like-link-' + id).click(function() { return false; }); } }, complete: function(){ $j('.loader-' + id).hide(); } }); }