kni-labs / rrssb

:arrow_right_hook: Ridiculously Responsive Social Sharing Buttons
https://rrssb.netlify.com/
MIT License
3.4k stars 423 forks source link

each(function(index, count)... second parameter is not count but element #191

Open tomaszrondio opened 7 years ago

tomaszrondio commented 7 years ago
// get buttons in reverse order and loop through each
$(buttons.get().reverse()).each(function(index, count) {

this is always true because count is not a number so backUpFromSmall() is fired every time if (!--count) backUpFromSmall();

dbox commented 7 years ago

Hey @tomaszrondio. Thanks! Care to offer a PR to fix?

tomaszrondio commented 7 years ago

I would if I could :) I am not sure what would be a fix here that is why I opened an issue instead of PR.