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
  • Share
  • Copyright 2016 by WebiBeris.com. All Rights Reserved.