Please could someone advise why the toggle() function is not working? Im hoping theres more to this than a simple syntax issue, rather there is a more technical reason this isnt working.
JS
$('a').click(function(){
console.log('Clicked...');
$('#login-form').toggle(function(){
console.log('Show...');
$(this).show();
}, function(){
console.log('Hide...');
$(this).hide();
});
});
HTML
<a href="#" title="">Link</a>
<div id="login-form"></div>
CSS
#login-form {
border:1px dashed red;
display: none;
height: 100px;
width: 100px;
}