Reputation: 8541
How can I handle the bind transitionend on browsers that don't support it?
If I have
$('#div').bind('transitionend', function(){...});
$('#div').css('width','100px'); //this will start transition if supported
How can I make it working in ie8? I tried to make a string which contains "transitionend" if the browser support it, and "change" if not, but i think it's not a good idea.
var transitionstring = 'transitionend';
if (IE) transitionstring = 'change';
//bind custom handler
$('#div').bind(transitionstring , function(){...});
$('#div').css('width','100px'); //this will start transition if supported, else
//the change event will be triggered
Any suggestion?
Upvotes: 0
Views: 600
Reputation: 3532
you can try adding a custom trigger on css using cssHooks
example http://jsbin.com/UgiCUd/
Upvotes: 0