By first Click; hide an element immediately and by second click show it again after 3 seconds

By first Click; hide an element immediately and by second click show it again after 3 seconds

Hi,

I want to achieve that when I click on a button the caption of my slider hides immediately and a second click on the button shows the slider caption after 3 seconds delay.

I tries this code: <style>.hide: display:none;</style>
  1. ("#hamburger-menu").click(function() {
  2.     
  3.     $(".slider .caption").each(function() {
  4.       var kir = $(this);
  5.       if( kir.hasClass("hide") ) {
  6.         setTimeout( "kir.removeClass('hide');",3000 );
  7.       }
  8.       else {
  9.         kir.addClass("hide");
  10.       }
  11.       
  12.     });

But it doesn't work.
    Could you please help me what is wrong with my code?

        Thanks