hi guys,
i am using jquery to hide/show an element, but when i click it first time, it does nothing, then proceeds to work correctly (toggling) from the second click onwards... any idea why the link seems to need 'activating'?
here is the code:
also, and this might be of help in the diagnosis, there are 2 places where you can click this link... and whenever you use one for the first time, or if you have just used the other one, it will need a double click to kick it off (well, not strictly a double click, can be as slow as you want)
any ideas?
i am using jquery to hide/show an element, but when i click it first time, it does nothing, then proceeds to work correctly (toggling) from the second click onwards... any idea why the link seems to need 'activating'?
here is the code:
Code:
$(document).ready(function(){
$("a.contactToggle").toggle(function(){
$("#aContact").animate({ height: 'hide', opacity: 'hide' }, 'slow');
},function(){
$("#aContact").animate({ height: 'show', opacity: 'show' }, 'slow');
});
});
also, and this might be of help in the diagnosis, there are 2 places where you can click this link... and whenever you use one for the first time, or if you have just used the other one, it will need a double click to kick it off (well, not strictly a double click, can be as slow as you want)
any ideas?