Avatar of JOHNFROG
 asked on

How to set the scroll point of a jquery.localscroll plugin

I have a localscroll plugin the same as you see in the "what we do' section of this link

I have converted the entire page to an aspx but lets assume all the html is the same.

My question is - How would I force say the 3rd item to be the one that is displayed on form load?

I am a newbie to javascript but have been playing around with using a  RegisterStartupScript to immediately scroll to the 3rd (or any nominated) section.

My problem is I cannot find the right code that will perform this for me.

Here is a link to the page I have been trying to interpret fro a solution. (This is the actual pluggin I am working with.)

So, how can I override the default position (being the first div) and  determine the visible section of the wrapper div on form_load.

Here is the current code from the plugins.js file.

            $.localScroll.defaults.axis = 'y';
                  target:  '#services-container',
                  queue:    true,
                  margin:   true,
                  duration: 1000


Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

That was not exactly what I needed but it gave me some information that helped me achieve what i was looking for. Thanks
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.