Skip to content

Instantly share code, notes, and snippets.

@ygkn
Last active December 12, 2016 14:38
Show Gist options
  • Save ygkn/15ea4de980997d53cc565b4f16bbcb68 to your computer and use it in GitHub Desktop.
Save ygkn/15ea4de980997d53cc565b4f16bbcb68 to your computer and use it in GitHub Desktop.
CSSのtransitionアニメーションが終わったら関数を実行 ref: http://qiita.com/ygkn/items/aabc47e8d678d714fb81
let time = $(el).css("transition-duration");
if(/ms$/.test(time)){ // msかどうか
time = parseFloat(time);
} else {
time = parseFloat(time) * 1000;
}
setTimeout(()=>{
// Do something...
}, time);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment