Last active
December 12, 2016 14:38
-
-
Save ygkn/15ea4de980997d53cc565b4f16bbcb68 to your computer and use it in GitHub Desktop.
CSSのtransitionアニメーションが終わったら関数を実行 ref: http://qiita.com/ygkn/items/aabc47e8d678d714fb81
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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