Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

vitto/jquery-after-css-transition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

jquery-after-css-transition

A simple jQuery plugin that help to append CSS classes after CSS transitions or after another CSS class.

You can try it on JSFiddle or view the code below:

CSS code

#dropdown {
	opacity: 1;
	transition: opacity 0.25s ease-out;
}
.hidden {
	display: none;
}
.invisible {
	opacity: 0;
}

jQuery code

$(function() {
    var $area = $("#hover-area");
	var $dropdown = $("#dropdown");

	$area.on("mouseenter", function () {
	    $dropdown.removeClass("hidden").removeClassAfter("invisible");
	});
	
	$area.on("mouseleave", function () {
	    $dropdown.addClass("invisible").addClassAfterTransition("hidden");
	});
});
    

About

Appends selectors after CSS transitions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published