Question : jquery variables in quotations

Real simple how can you include variables in javascript  So i roll over a button and it grabs the rel attribute, i want to use that in the identifier for my .show() method.  So basically i add a rel to my buttons to make it so my function hides the id of what ever the rel states on rollover.   So temp2 basically ends up equal to "#nav5" so i want the last line of the script to run

$("#nav5").hide();

makes sense in theory but doesnt work

.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
$(document).ready(function()
{
		$("#tab a").mouseover(function()
		{
		var temp = $(this).attr("rel");
		var temp2 = '"#'+temp+'"';
		
		$(temp2).hide();
		
		});
});

Answer : jquery variables in quotations

I made this exemple and it works:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
$(function(){
    $("#tab a").mouseover(function(){
        $("#"+$(this).attr("rel")).hide();
    });
});
</script>

<div id="tab">
	<a href="aushaus" rel="bt">AAAAAAaa</a>
    <input type="button" id="bt" value="Botao" />
</div>
Random Solutions  
 
programming4us programming4us