PDA

View Full Version : Floating Menu Script - floats off page



northyukon
02-05-2010, 06:44 PM
/*
Floating Menu script- Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
This is the script I am using on this page: www.thepercy.com/sponsors.html

My problem is that it keeps scrolling past the bottom of the page forever and ever.
Thanks: Northyukon

djr33
02-05-2010, 07:21 PM
In what browser? It works fine for me in Firefox.

northyukon
02-06-2010, 02:33 AM
I'm using windows internet explorer 8

stringcugu
02-06-2010, 07:57 AM
move your div up
<div id="container" style="position: absolute; left: 24px; top: 5px; height: 950px; width:1100px">
<div id="banner" style="position: absolute; left: 19px; top: 14px; width: 943px">
and change this

var startX = 40, //across
startY = 120; //up

northyukon
02-06-2010, 06:44 PM
My Floating Menu Script now works just fine. If only I understood why I made the suggested changes. Thanks again.

djr33
02-06-2010, 08:12 PM
As I understand it (just looking at the code here, not testing it), your div was continuously being pushed below the bottom of the page. As it "created" more page below, then you could scroll to the bottom of the div. Once you did that, though, the div was pushed more below. Basically the div was digging past the bottom of the page and you were able to follow as it did so: then it would keep going.
By moving it up some this means it will never extend itself past the bottom of the page and now the infinite loop will be avoided.