scrollability icon indicating copy to clipboard operation
scrollability copied to clipboard

two issues and one question

Open heatxsink opened this issue 12 years ago • 6 comments

here we go ...

issues

  1. looks like all of the examples are pointing to scrollability.min.js which isn't even checked in. (my way around this is to download the scrollability.min.js file from your example site however it's minified so i can't find the unminified version of that js anywhere. :-/
  2. scrollability.js in master has two bugs in it based around the 'export' and 'require' variables don't exist. this kind of defeats "the whole drop in this script and stuff just works" paradigm

question

in an older version of scrollability there was a method to scrollToTop. how would one do that now?

thanks, nick

heatxsink avatar Nov 22 '11 16:11 heatxsink

I have the same issues and question. any thoughts joe?

youngpip avatar Dec 04 '11 17:12 youngpip

You can get the code working but as it stands it looks like there are two variable that aren't defined. "exports" and "require"

To get the code running just comment out or remove all of the exports stuff (lines 77-84). Then on line 94 where require is mentioned, just pull the two lines of code out of that ready function and comment the ready function out. After doing this your code will run. I'm not sure what the deal is with the exports and require function but I assume we're missing some code for that stuff.

yourfavorite avatar Dec 10 '11 22:12 yourfavorite

after some poking around it looks like the repo is/was built for node.js (via npm) hence "exports" and "require"?

heatxsink avatar Dec 10 '11 23:12 heatxsink

Yeah I found the same thing just after posting.

yourfavorite avatar Dec 10 '11 23:12 yourfavorite

Great stuff, that's worked for me too.

Any idea on how to replicate the old scrollToTop function though? Without that I'm pretty stuck.

youngpip avatar Dec 11 '11 10:12 youngpip

ah maybe it's CommonJS format and not npm? anyone?

heatxsink avatar Jan 03 '12 08:01 heatxsink