Stop a page moving upwards
-
Hi guys, I have a small question, I am creating a website and have created a table using ul elements. (I used ul as this was easier to animate using javascript and it does what i want.... I did try using tables and it messed up. When I click on one of the ul items the page stays where it is. However when i click another one the page then shoots to the top. I have read around and some people say do the following
However this still sends the page to the top. If any body knows any tips/tricks as to how to solve this it would be mighty helpful.
-
Hi guys, I have a small question, I am creating a website and have created a table using ul elements. (I used ul as this was easier to animate using javascript and it does what i want.... I did try using tables and it messed up. When I click on one of the ul items the page stays where it is. However when i click another one the page then shoots to the top. I have read around and some people say do the following
However this still sends the page to the top. If any body knows any tips/tricks as to how to solve this it would be mighty helpful.
-
Hi guys, I have a small question, I am creating a website and have created a table using ul elements. (I used ul as this was easier to animate using javascript and it does what i want.... I did try using tables and it messed up. When I click on one of the ul items the page stays where it is. However when i click another one the page then shoots to the top. I have read around and some people say do the following
However this still sends the page to the top. If any body knows any tips/tricks as to how to solve this it would be mighty helpful.
When you supply an href you're telling the browser to navigate. The only exception is if you have a special href value prefix like mailto: or javascript: If you change your link to:
[blah](javascript:SomeMethod();)
or
blah
it should not navigate to the top. Ideally you should omit the href attribute altogether, and use the 'click' event, either as the onclick attribute, or as an event binding in javascript code.
“I have no special talents. I am only passionately curious.” - Albert Einstein