bitovi / jquerypp

jQuery's missing utils and special events
http://jquerypp.com
MIT License
1.21k stars 167 forks source link

Get jQuery.animate CSS animations to work with Opera #21

Open daffl opened 12 years ago

daffl commented 12 years ago

Currently Opera support is disabled. Test if CSS 3 animations work as expected in Opera 12. Currently doesn't fire the transition end event.

goldfire commented 11 years ago

I'm getting all sorts of errors on Opera 12.11 that completely keeps my webpage from working at all.

Uncaught exception: DOMException: SYNTAX_ERR
Error thrown at line 280, column 4 in <anonymous function>(style) in /js/jquery.animate.js:
    cache.push({
called from line 390, column 3 in <anonymous function: $.fn.animate>(done) in /js/jquery.animate.js:
    animationName = getAnimation(style);
called via Function.prototype.call() from line 2, column 50714 in <anonymous function: dequeue>(e, t) in /js/jquery.min.js?ver=1:
    i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()
called from line 2, column 51777 in <anonymous function: queue>() in /js/jquery.min.js?ver=1:
    v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)
called via Function.prototype.call() from unknown location in <anonymous function: each>(e, n, r) in /js/jquery.min.js?ver=1:
    /* no source available */
called from line 2, column 22400 in <anonymous function: each>(e, t) in /js/jquery.min.js?ver=1:
    return v.each(this,e,t)
called from line 2, column 51514 in <anonymous function: queue>(e, n) in /js/jquery.min.js?ver=1:
    return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})
called from line 323, column 2 in <anonymous function: $.fn.animate>(props, speed, easing, callback) in /js/jquery.animate.js?ver=4:
    this.queue(optall.queue, function(done) {
called from line 1, column 453 in <anonymous function: window.endPreload>() in /js/holdem.min.js?ver=3:
    nowConnected&&$("#preload").css("opacity",1).animate({opacity:0},600,function(){$(this).hide()})
called from line 1, column 8071 in <anonymous function: now.setupTable>(e) in /js/holdem.min.js?ver=3:
    $("#potChips").html(r),setTimeout(function(){$("#potChips").html(r)},700),table.dealerChat(e.dealerChat),table.userChat(e.userChat),nowConnected=!0,windowLoaded&&endPreload()
nerdfiles commented 11 years ago

Will this ever be addressed? Still an issue in Opera/9.80 (Macintosh; Intel Mac OS X 10.8.3) Presto/2.12.388 Version/12.15.

https://gist.github.com/nerdfiles/5596325

nazar-pc commented 11 years ago

The same on Linux, Opera 12.16.

Code example very simple:

$('#home-tests-list').animate({'opacity':1},1000)

But I receive Uncaught exception: DOMException: SYNTAX_ERR

nazar-pc commented 11 years ago

I fixed this problem for myself in such dirty way:

$.fn.animate = function (props, speed, easing, callback) {

replaced by

if (!/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)) $.fn.animate = function (props, speed, easing, callback) {

This does not solve anything, but disable animation replacement in Opera browser.