I'm trying to Hide/Show a DIV
based upon a Variable. This is what I have so far.
I POST
the variable into an INPUT
<input type="text" id="showhidediv" name="showhidediv" value="<?php echo $ta; ?>">
This is my jQuery
<script type="text/javascript">
$(document).ready(function(){
var show=('#showhidediv');
if(show == 2) {
$('#landlord').show();
}
else if(show == 1)
{
$('#landlord').hide();
}
});
</script>
When the variable is posted into the form from another form the DIV
doesn't hide.
Where have I gone wrong?