|
|||
div scrollbar -> jump to top
hi alle beisammen,
habe eine seite auf der ich mit dem script ( http://www.dynamicdrive.com/dynamici...jaxcontent.htm ) (AJAX) dynamisch den content in einem div ändere. Jetzt habe ich das problem, dass wenn ich auf einer seite nach unten gescrollt habe und nun die nächste seite aufrufe, er sich die position des scrollbars gemerkt hat und dann nicht oben bei dem neuen content anfängt... siehe http://www.gaebler.org gibt es sowas wie für die normalen browser mit dem man innerhalb eines div jump to anchor/ top machen kann? mfg freindler |
Sponsored Links |
|
|||
Ich weiß ja nicht welchen Browser Du verwendest, aber mit FF 1.5 bzw. Opera 9 gibt es Dein "Problem" nicht ... abgesehen davon habe ich gehört, dass scrollbars von alleine nicht wieder automatisch nach oben springen
aber nette Bilder |
Sponsored Links |
|
|||
habe hier ie6, i27 beta3, firefox 1.5x, opera8, opera 9...
alle machen dass... bin aber vor wenigen minuten auf eine lösung gestoßen, trotzdem danke. hier die lösung: Code:
<HTML> <HEAD> <TITLE>Document Title</TITLE> <style> .cont{ position:absolute; left:150; top:100; width:200; height:300; font-size:30; overflow:auto } .cont2{ position:absolute; left:450; top:100; width:200; height:200; font-size:30; overflow:auto } </style> <script language="JavaScript"> <!-- function back_to_top(id){ document.getElementById(id).scrollTop=0 } // --> </script> </HEAD> <BODY> <div id="One" class="cont"> LAYER 1 CONTENTS <P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>End </div> <P><a href="#null" onclick="back_to_top('One')">Click Here to Scroll <b>Layer 1</b> Back to the Top</a> <div id="Two" class="cont2"> LAYER 2 CONTENTS <P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P>SOME TEXT<P>Some Text<P> </div> <P><a href="#null" onclick="back_to_top('Two')">Click Here to Scroll <b>Layer 2</b> Back to the Top</a> </BODY> </HTML> // DAS IST NICHT VON MIR GETIPPT WURDEN !!! // STAND AUCH IN IRGEND EINEN FORUM. mfg freindler |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
DIV variable Höhe + scrollbar | suckey | CSS | 0 | 11.09.2013 14:08 |
Inhalt in Div scrollbar? | axi92 | CSS | 1 | 18.04.2013 16:37 |
Fragen zu CSS und Joomla | DOKTOR | CSS | 2 | 23.05.2011 20:29 |
Brauche Hilfe: Schwarzes Nichts | Zwox | CSS | 10 | 19.11.2010 17:53 |
div scrollbar machen, problem mit position:absolute | Nerospeed | CSS | 4 | 11.08.2009 19:18 |