Giter VIP home page Giter VIP logo

Comments (8)

tmorehouse avatar tmorehouse commented on May 21, 2024

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.

lancevjm avatar lancevjm commented on May 21, 2024

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.

flesler avatar flesler commented on May 21, 2024

@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.

lancevjm avatar lancevjm commented on May 21, 2024

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.

tmorehouse avatar tmorehouse commented on May 21, 2024

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.

lancevjm avatar lancevjm commented on May 21, 2024

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.

flesler avatar flesler commented on May 21, 2024

Thanks @tmorehouse for the help

from jquery.scrollto.

tmorehouse avatar tmorehouse commented on May 21, 2024

No problem :)

from jquery.scrollto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.