first commit
This commit is contained in:
18
bootstrap/node_modules/after-transition/index.js
generated
vendored
Normal file
18
bootstrap/node_modules/after-transition/index.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
var hasTransitions = require('has-transitions');
|
||||
var emitter = require('css-emitter');
|
||||
|
||||
function afterTransition(el, callback) {
|
||||
if(hasTransitions(el)) {
|
||||
return emitter(el).bind(callback);
|
||||
}
|
||||
return callback.apply(el);
|
||||
};
|
||||
|
||||
afterTransition.once = function(el, callback) {
|
||||
afterTransition(el, function fn(){
|
||||
callback.apply(el);
|
||||
emitter(el).unbind(fn);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = afterTransition;
|
Reference in New Issue
Block a user