I want to make a function to show and hide a div tag and hide all others:
function showPage(showdiv){
$(\'#midRight\').not(showdiv).hide();
$(showdi
Fixed up some syntax errors. As the comments say, you're appending an empty string with the variable, just use the variable. Also, you need to tell the selector to select the children of the targetted container:
function showPage(showdiv){
$('#midRight').children().not(showdiv).hide();
$(showdiv).show();
}
Demo: http://jsfiddle.net/ACGMj/1/