javascript - How do i delay this function -
this question has answer here:
- delay jquery effects 6 answers
i have code:
$('a[href*=#]').click(function() { $('html, body').animate({ scrolltop: $($.attr(this, 'href')).offset().top }, 500); return false; });
but need 600ms delay after click link page have chance perform other actions set 500ms, thank in advance
jquery has delay
method
$('a[href*=#]').click(function(){ $('html, body').delay(600).animate({ scrolltop: $( $(this).attr('href') ).offset().top }, 500); return false; });
Comments
Post a Comment