Add a delay in jquery -


i add delay between apparition of circle , apparition of content. tried "delay" nothing happen.

my jsfiddle

$('.toggle-menu').click(function (e) {     e.preventdefault();     $('h4.toggle-menu').text($(this).text() == 'menu' ? 'close' : 'menu');      $('.circle').toggleclass('opacity');     $('#overlay-menu').delay(5000).toggleclass('opacity');     $('.circle').toggleclass('open');  }); 

try using window.settimeout.

window.settimeout(function() {                       $('#overlay-menu').toggleclass('opacity');}                   ,1000 ); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -