-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not using es6 or babel or require #67
Comments
Hi there, Sorry for the late answer! If you're not using ES6 or extending the base class of See this demo; there's no additional JavaScript classes, only the required code to initialise it. Passing 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. |
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? |
Hey @adamjw3, sorry for replying one year later. 😅 |
I'm loading the script in my html
/resources/js/plugins/smooth-scrolling.min.js
In my js file i have
var section = document.querySelector(".js-slider");
var child = document.querySelector(".js-item");
But this doesn't do anything, I can see from you demos and code examples you are using es6. I'm not i'm using old javascript. how do i extend smooth to use the custom.js (as per demos) but not use es6!
i've tried bits like this
var smooth = new Smooth({
preload: false,
native: false,
direction: "horizontal",
section: section,
divs: child,
run: function() {
// do something
}
Thanks
The text was updated successfully, but these errors were encountered: