Code:
$('#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.
|