Open bonzani opened 7 years ago
Looks good to me. Can anyone else confirm?
It would be very good if someone else could confirm, since it is the only thing preventing multiple times per site usage. I am using it with the above changes on my site and did not encounter any issues.
ping @dbox
Pull Request for Issue #191.
Problem
The backUpFromSmall function gets unnecessarily often called because the if condition is always true. The code with the count variable and if condition was introduced in 1a55eb4c7c3e4838452d88933707979501b86dcd . The count variable was then shadowed in b179044bb005bc9d35189f0a3885f801ea42a127 with a parameter. The original count variable was then removed in b615b21f6d568f7728ccbc7a45423b504984f09a, since it was not used anymore. According to the jquery docs the second argument of each is the value and not the count.
Summary of Changes
Rename the second argument of each from count to value and move the backUpFromSmall call to the outer loop.