j.link Posted July 26, 2013 Share Posted July 26, 2013 Hi, I'm rather new to webdesign and I have a little problem with my first page. If you take a look at http://www.linkedrecords.com/testsite/index.php and click on the "AGB" Button, a center panel opens with a small navigation menu on the left side.I wanted to use a jQuery effect to scroll internal anchor links, but all I have tried just doesn't work. As there are some other scripts running on the page, could there be a problem with them? I appreciate every help and suggestions if you think my scripts need improvement. Thank you, j.link Link to comment Share on other sites More sharing options...
justsomeguy Posted July 26, 2013 Share Posted July 26, 2013 You have the same code to attach click handlers twice, once in the animate-scrolling.js file and once in the head. So every time you click it's going to run both event handlers. Since there is a call to stop on the body, that might cancel the animation. Link to comment Share on other sites More sharing options...
j.link Posted July 27, 2013 Author Share Posted July 27, 2013 Thanks for your quick reply. Ah, silly mistake that happened when I got too much scripts on index.php and I started outsourcing each script I just forgot to delete that peace of code. But unfortunately that's not the problem. The function still doesn't work. Any other ideas? Thank you, j.link Link to comment Share on other sites More sharing options...
justsomeguy Posted July 29, 2013 Share Posted July 29, 2013 The code is working fine, but there's nothing to animate. You're trying to animate scrolling of the html or body elements, but those elements don't have any scroll bars. The page jumps to the content when it gets to the callback after the animation, so everything is running fine. But you shouldn't scroll the body element, you should scroll the content-agb element. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now