$j = jQuery.noConflict(); $j(document).ready(function() { $j(".postvotes a").click(function(){ id = $j(this).parent().attr("id"); args = id.split("-"); b = Number(args[1]); p = Number(args[2]); $j.ajax({ type: "POST", url: "/wp-content/mu-plugins/postvotes.php", data: "b="+b+"&p="+p, dataType: "json", success: function(r) { if (typeof(r.score)=="string") $j("#"+id).html(r.score+" recommendations"); else if (r.error) $j("#"+id).html(r.error); } }); return false; }); });