I have a jquery code to display one div and hide the rest dynamically on the same page. And im having a little problem, when i only try to acess directly(via url) to the login page index.php#login im sent back to the main page index.php#home
This happens because the login as to be set as hidden. So is there anyway i can go around this?
$('#w').live('click', function(){
$('#b').css('display','none');
$('#a').css('display','block');
});
$('#x').live('click', function(){
$('#a').css('display','none');
$('#b').css('display','block');
});
<li><a href="#home" id=w>Home</a></li>
<li><a href="#login" id=x>Login</a></li>
<div id=b style="display:none;">
// Login
</div>
<div id=a>
// Main content
</div>
Ps: Sorry for my bad english