1

I am working with jQuery Spritely plugin for moving cloud animation. This worked with jQuery-1.6.4 but with jquery-1.11+ this plugin doesn't work.

JS:

$(document).ready(function() {
    $('#cloud, #cloud3').pan({fps: 30, speed: 2.5, dir: 'right'}); 
    $('#cloud2, #cloud4').pan({fps: 20, speed: 1.5, dir: 'right'}); 
});

HTML:

<div class="box">
<div class="cloud" id="cloud"></div>
<div class="cloud" id="cloud2"></div>
</div>

How can I fix this?

Demo(Working): http://jsfiddle.net/8GwB5/ (with jQuery 1.6.4)

Demo(Not Working) : http://jsfiddle.net/8GwB5/1/ (with jQuery 1.11.0)

Pink Code
  • 1,802
  • 7
  • 43
  • 65
  • It looks like the plugin depends on `$.browser`, which was removed in jQuery 1.9. You can either use the jQuery migrate plugin to restore this functionality (I don't recommend), use jQuery 1.9, upgrade Spritely to 0.6.8 to see if it's fixed, or find another plugin. You could've found the source of the problem if you checked your browser console (it's all I had to do) – Ian Aug 02 '14 at 21:01
  • 1
    It seems to work by upgrading to 0.6.8: http://jsfiddle.net/ianpgall/9CyK4/ – Ian Aug 02 '14 at 21:03

1 Answers1

1

When you encounter a similar problem... simply hit F12
open Console ▼ and refresh the page. You might see something like:

TypeError: $.browser is undefined
if ($.browser.msie) {

than if you Google for: jquery TypeError: $.browser is undefined
the first result is: TypeError: $.browser is undefined

Community
  • 1
  • 1
Roko C. Buljan
  • 196,159
  • 39
  • 305
  • 313