I'm currently facing a challenge in delaying an animation. I've attempted both the Jquery attribute method and the setTimeout JavaScript approach, but unfortunately, neither has produced the desired outcome for me. The code is linked to a CSS ID and is running as expected. Any assistance or guidance on this matter would be greatly appreciated. Below is the code snippet. Thank you in advance
Original Code:
$(function () {
$('#floatingbar').css({height: 0}).animate({ height: '50' }, 'slow');
});
Delay Implementation:
$(function () {
$('#floatingbar').css({height: 0}).delay(2000).animate({ height: '50' }, 'slow');
});
Feel free to share more information if needed.