New to jquery newbie help with $.get

Hey there,

I’m trying to run an update script from my jquery application when the user presses the friendConfirm button. What’s going on is that when I press this button my server is redirected to the root of my domain with the number 4. (cca:8888/4) I’m not quite sure why this is happening and what I’m doing wrong after some investigation of the jquery manual and online tutorials.

here is my code:

$(document).ready(function(){
	$(".friendAdded").css('display', 'none');
	var frid = $(".friendRequest").attr('id');
	$(".friendConfirm#"+frid).click(function(){
		$.get("JSON/addFriend.php?fid="+frid,
			function(data){
			$(".friendAdded").append(data);
			$(".friendAdded").show() })
	});

});

Thanks for the help