| Forums > Help! > "how to let page auto scroll up aft changing tab?" (3 replies)
|
|
|
Hello
For example this is my link to the Terms and conditions
[a class="cute" onClick="document.getElementById('content').innerHTML=document.getElementById('term').innerHTML" title="TERMS & CONDITIONS + RETURN POLICY"]T & C [/a]
but when i press on it and go to the term and condition tab, the page wouldn't scroll up. so for some instance when i am half through my page, and i click on the tab, I'll be at the terms and conditions page halfway through. That will be awkward.
How do I make the page auto scroll up after clicking on the tabs link? Please help!
Edited 11 months ago. |
| |
|
| |
|
| |
Add this code to the code above:
href="javascript:scroll(0,0)"
so, your entire code will look something like this
<a href="javascript:scroll(0,0)" class="cute" onClick="document.getElementById('content').innerHTML=document.getElementById('term').innerHTML" title="TERMS & CONDITIONS + RETURN POLICY">T & C</a>
Edited 11 months ago. |
| |
| |
|
| |
ahh, thanks so much! ^^
then is it possible to let it scroll smoothly upwards, and stop not at the topmost of the page but slightly lower? (:
|
| |
| |
|
| |
oh, i solved the stopping halfway to the page by doing this
href="javascript:scroll(0,450)"
|
| Subscribe To This Thread: RSS 2.0 or Atom (?) |
| This thread has been locked, and no new replies can be posted. |