I am using the following js to click on divA to fade out divB, and then click on divA again to fade in divB. It works the first time, but not the rest.
My apologies for the terrible script (I know nothing about js), but could someone help me fix this? MANY THANKS FOR ANY HELP!
Thanks for the reply. Unfortunately, the new code just fades out and then fades in divB. If possible, I would like it to do both as separate actions triggered by clicks, as described above.
$('#divA').toggle(function () {
$('#divB').stop().fadeOut(500);
}, function () {
$('#divB').stop().fadeIn(500);
});
The jQuery docs for toggle seem to be wrong.. that is, the wrong way round
Quote:
handler(eventObject)A function to execute every even time the element is clicked.
handler(eventObject)A function to execute every odd time the element is clicked.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Last edited by AndrewGSW; 12-31-2012 at 12:29 AM..
Thanks, AndrewGSW--That did the trick!!!!!!! Is that cross-browser?
Well, it's jQuery, so.. yes.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS