Skip to content

springmerchant/themes-lib-jquery.trend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.trend

Fail-safe TransitionEnd event for jQuery.

Adds a new trend event that can be used in browsers that don't support transitionend.

It works by parsing an element's transitionDuration and transitionDelay properties and using setTimeout as a fallback. Because of this, Trend can only be used with jQuery.one.

Usage

.some-element {
  opacity: 0;
  transition: opacity 1s ease 200ms;
}

.some-element.active {
  opacity: 1;
}
var el = $(".some-element");

el.addClass("active");

el.one("trend", function(e){
  // Called approx 1200ms later
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%