Remove class after sometime in jquery

JavaScript

var link = $('#link');
link.addClass('currentclass ');
setTimeout(function() {
    link.removeClass('currentclass ');
}, 3000);

CSS

    .currentclass { color:red}

HTML

    <a href="#" id="link">link</a>

Preview snippets

Run Snippets

Copyright 2024 by WebiBeris.com. All Rights Reserved.