jQuery.scrollIntoView
jQuery.scrollIntoView copied to clipboard
Fixes iteration bugs in commonAncestor
Arwid,
Really like this plugin, works great. But initially it didn't work at all (current Chrome or Firefox). Not user how this might have been working before or why the code was using the for/in syntax but that syntax isn't for iterating over arrays. I replaced it with regular array iteration and it works like a charm.
--Ken
I just pushed an additional bug fix to the master branch. This new bug results in an unhandled exception if the jQuery array upon which scrollIntoView is called is empty, as would be the case when the selector didn't match anything. eg. $('.some-optional-class').scrollIntoView() //Scroll these elements into view if they are there.
Let me know and I can split these into separate pull requests on separate branches if you wish.