How to remove class from an element after delay using jQuery


How to remove class from an element after delay using jQuery How to remove class from an element after delay using jQuery

Free jQuery snippet to remove class from an element after delay of a few seconds. This snippet uses setTimeout function to delay the execution of the script. To remove class we simply use removeClass jQuery function.

Source Code:

<script>
	$(document).ready(function () {
		$("div").addClass("red");

		setTimeout(function() {
			$("div").removeClass("red");
		}, 3000);
	});
</script>

Free


Tested pass quality product

Included new future

Demo Download

Reviews and Comments