2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-18 12:39:41 +03:00

Merge pull request #8774 from liuyl/transition

fix transition end
This commit is contained in:
Jacob
2013-07-29 11:23:29 -07:00
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -50,8 +50,8 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") }
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this
$(this).one('webkitTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger('webkitTransitionEnd') }
$(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -43,8 +43,8 @@
// http://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false, $el = this
$(this).one('webkitTransitionEnd', function () { called = true })
var callback = function () { if (!called) $($el).trigger('webkitTransitionEnd') }
$(this).one($.support.transition.end, function () { called = true })
var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}