views:

170

answers:

2

Plugin: jQuery lazy()

I ask here because the project page itself seems to be dead.

What steps will reproduce the problem? 1. embed two jQuery-Plugins that are both using the $.getJSON function results in a "too much recursion error" in firefox. If the same scripts are referenced with lazy it works fine. Problem only persits in firefox. 2. See example here:

http://www.marctv.de/lazybug/lazy.htm

What is the expected output? What do you see instead? Expected: both getJSON calls should work ok. But with lazy I get a "too much recursion" error.

What version of the product are you using? On what operating system? latest lazy version. Error can be reproduced with all jquery versions.

What can we do? Any ideas?

A: 

Link to plugin

codecandies
A: 

I had the same problem. I found that the recursion happens on line 111 in proxy() function. I solved this by redownloading plugin. You can try patching your code with this:

if( $.lazy.archive[src].status === 'loaded' ) {

  $.lazy.archive[src].status = 'unloaded';
  $.each(this,function(){
    $(this)[name].apply(self,arg);
  });

}
martins256