Hi,

I'm a newboy with JQuery and AJAX so hopefully the question isn't too stupid ........

I'm trying to hide a few spann classes with has a variable class hide_record_xxxx. Hiding a ID or class isn't a problem but how do I call a variable in the hide function?

Code:
<script type="text/javascript">
$(document).ready(function(){
 $("body").on("click", ".delbutton", function() {
	var id = $(this).attr("id");
	var dataString = 'id='+ id;
	var parent = $(this).parent();
	var hide_record = 'hide_record_'+ id;
	// alert(dataString);
	alert(hide_record);
	if(confirm("Weet u zeker dat u dit onderdeel wilt verwijderen?")) {
		$.ajax({
			type: "POST",
			url: "toernooi-onderdelen-verwijderen-ajax.php",
			data: dataString,
			cache: false,
			success: function(){
		  	parent.fadeOut('fast', function() {$(this).remove();});
				alert(hide_record);
				
				$(+hide_record).hide();
				//$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
				//.animate({ opacity: "hide" }, "slow");
			}
		});
		// $(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
		// .animate({ opacity: "hide" }, "slow");
	}
	return false;
	});
});
</script>
The var hide_record is giving me the right alert but how make I this class to hide?

Kind regards,

Arie