Comments (3)
Hi there,
Sorry for the late answer! If you're not using ES6 or extending the base class of Smooth
you can still use the basics by loading smooth-scrolling.min.js
.
See this demo; there's no additional JavaScript classes, only the required code to initialise it.
Passing a run
function to the options will do nothing, as it's not listed in the README.
Passing divs
in the options using smooth-scrolling.min.js
will do not work either because this snippet has been taken from another demo that has other options.
There's a few other ways to extend a function prototype; have a read here on MDN and on Stack Overflow. If you can implement ES6 + babel, I'd recommend it. ES6 has just simpler ways to do the same thing we do in ES5, like extending a function's prototype.
from smooth-scrolling.
Been looking more at es6 so adding this to my workflow using grunt. Looking at using browserfy with babel transform. What do you use?
I've seen that a lot of people either do one bundle across all pages or attempt to split the bundle into pages. What do you do?
from smooth-scrolling.
Hey @adamjw3, sorry for replying one year later. 😅
You can have a look at the package.json of this repository, I'm using simple npm scripts. Obviously, you'd rather use grunt/gulp or webpack for bigger projects.
from smooth-scrolling.
Related Issues (20)
- Horizontal scroll demos not working HOT 2
- (Parallax demo) vs-scrollbar-smooth and vs-scrollbar-parallax got different scroll position after smooth.scrollTo
- Build version including parallax HOT 4
- Empty space at page bottom when transitioning page HOT 2
- Has the latest version been published to NPM? HOT 2
- scrollTo() after resize HOT 2
- Cannot find module 'babelify'
- Next.js Compatibility HOT 2
- Immediately set the scroll position HOT 2
- How to implement with GSAP ScrollTrigger HOT 17
- Scroll event on container not working
- Hiding the scroll thumb when content doesn't extend beyond viewport. HOT 4
- Scrolling section responsive
- Uncaught TypeError: Class constructor Smooth cannot be invoked without 'new' HOT 1
- Error when building HOT 1
- StickySidebar with Smooth-Scroll
- Use native touch scrolling? HOT 6
- Smooth.resize() when using native gives error. HOT 1
- Custom easing function? HOT 1
- Horizontal scroll demo with both Y and X scrolling HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smooth-scrolling.