Jump to content
j.link

help with jQery slide to anchor links

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...