Here is the code snippet I'm currently working with:
$('[data-hook="chat"]').click(function () {
$('[data-hook="case"]').toggleClass('col-sm-12 col-sm-9');
$('.chat').delay(500).fadeToggle('slow');
});
It works smoothly when it adds the col-sm-9
class and fades in the chat. However, I am wondering if there is a way to seamlessly reverse this process so that when fading out and reapplying the col-sm-12
class, the delay is applied to the toggleClass()
instead of the fadeToggle()
.
Thanks, Otis.