Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    smooth anchor scrolling?

    Hello and this is my first post. sorry if i am on the wrong location. there is this site that has a real nice smooth scroll which is www.webdots.in I was curious to how to add that smooth scroll since I am building a one page web site. not only that but towards the end of the smooth scrolling it actually slows down nicely. Thanks in advanced

  • #2
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Try something like Scrolling HTML Bookmarks.
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #3
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks man! works great

  • #4
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WA View Post
    Try something like Scrolling HTML Bookmarks.
    Hey, how are things? I tried this and it works great at my home pc and any pc with internet explorer 8, but at work we have IE7 and it scrolls smooth but then right when it gets to where its supposed to anchor to, it jerks and moves to far down. see here, www.avamariestudios.com/homegoodonetest.html
    working links are about, photography (candid, engagement) and thats it, other links not active yet.

  • #5
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Hmm there's most likely something within your layout that's causing this, as the script works on other pages fine for me in IE7. What happens if you edit the following code inside the .js file:

    Code:
    				if ($bookmark.length==1 && !document.all || document.all && window.XMLHttpRequest) //non IE, or IE7+
    							$bookmark.html('.').css({position:'absolute', fontSize:1, visibility:'hidden'})
    by removing the part in red above?
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #6
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WA View Post
    Hmm there's most likely something within your layout that's causing this, as the script works on other pages fine for me in IE7. What happens if you edit the following code inside the .js file:

    Code:
    				if ($bookmark.length==1 && !document.all || document.all && window.XMLHttpRequest) //non IE, or IE7+
    							$bookmark.html('.').css({position:'absolute', fontSize:1, visibility:'hidden'})
    by removing the part in red above?
    Hey, Thanks alot! that worked.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •