Skip to content

Loading…

two issues and one question #29

Open
heatxsink opened this Issue · 6 comments

3 participants

@heatxsink

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

@youngpip

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

@yourfavorite

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.

@heatxsink

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

@yourfavorite

Yeah I found the same thing just after posting.

@youngpip

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.

@heatxsink

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.