Comments (8)
I think you can leave out the target, since you are binding localscroll to your #nav
container (i.e. the elements that will cause the scroll), assuming you want to scroll the whole document (unless your #content_wrap
is a container that has scrolling enabled and a set height)
$('#nav').localScroll({
axis:'x',
queue:true,
duration:1500
});
from jquery.scrollto.
OK maybe I left out some info. Sorry bout that. There are a few links which should scroll the relative hash section which is inside the target. Would that be correct? I have tried leaving the target out and it didn't work. Many elements are floated, I don't know if that could cause a problem, read something about that in another issue, but was dated back quite some time. What do you mean by 'has scrolling enabled? Maybe I'm missing that?
from jquery.scrollto.
@tmorehouse thanks a lot for replying to people 👍
@lancevjm It'd be much easier if you can put what you're working on online, you can email me privately if it's a problem. It's a lot hard to resolve issues like this.
from jquery.scrollto.
ok, so heres some dummy data: http://www.testing.fevafinda.co.za/ i would like the different sections to scroll. I am using codeigniter, I dont think that should be a problem tho.
Thanks alot guys.
from jquery.scrollto.
Looking at the structure of your page, it is not the div#content_wrap
that is scrolling, but the whole page.
Your script show you targeting section
elements.
jQuery(document).ready(function($) {
$('#nav').localScroll({
target:'section', // Could be a selector or a jQuery object too.
axis:'x',
queue:true,
duration:1500
});
});
you also have this in your CSS:
body, html {
height: 100%;
overflow: auto;
}
Remove the height: 100%
and overflow: auto
. This will reset your document back to normal scrolling.
and change your code to the following:
jQuery(document).ready(function($) {
$('#nav').localScroll({
duration:1500
});
});
And see if that works.
from jquery.scrollto.
aaaaahhh... works like a bomb! When I grow up I wanna be like you @tmorehouse Thanks so much for the help guys!
from jquery.scrollto.
Thanks @tmorehouse for the help
from jquery.scrollto.
No problem :)
from jquery.scrollto.
Related Issues (20)
- Tween HOT 4
- can this plugin be used to scroll to the bottom of the div HOT 2
- On chrome, if "scroll-behavior: smooth", the duration acts like a delay instead of duration HOT 1
- Not working in Firefox HOT 3
- How to fire jquery.scrollTo after page is completely loaded with all stuff HOT 1
- Cant get my website to work cross browser HOT 2
- initializing plugin using webpack HOT 1
- Not working in mobile version HOT 1
- Would be nice to support centering like scrollIntoView() HOT 2
- Setting to align scrolled item (e.g to bottom) HOT 3
- jQuery.isFunction() is deprecated HOT 1
- Please add info to not to use slim version of JQuery
- Small proposition to cdn doc HOT 1
- Configure speed and ease in HOT 1
- trick like scrollIntoView (center of div) HOT 1
- Scroll to second ID with the same name HOT 1
- Does it work with SVG? HOT 1
- How to scroll lists (ul or ol)? HOT 1
- [email protected]
- Scroll only if element is offscreen? HOT 2
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 jquery.scrollto.