General Community > Scripting Help

Need JavaScript Pleeeease :D.

(1/2) > >>

Jade Elizabeth:
So on my website I have a fixed menu that runs down the page with the viewer. Problem is when you click an anchor it hides the link because it displays behind the menu.

So I've looked around and though I found some CSS and jQuery solutions none of them worked and I do not want to add jQuery to the list of things my website is loading.


Can anyone please help me out by writing some JS that makes it so that when someone clicks an anchor, instead of arriving AT the anchor, it arrives 40px above the anchor?

I don't want to have to change billions of html links or move them above where they should. I just want it to work without hassle in the background so I can link to messages and things in topics, or categories, or what ever, and it will show them what they need to see :). I have no idea how this could work but I know there are a lot of people out there who could make use of this sort of thing.

System32Cro:
you want something like facebook:
http://www.zaslike.com/files/ehbpu2m1gpn8ol29kbe.png
when I scroll down, content inside red box became fixed. That's what you want?

Jade Elizabeth:
That's pretty cool but nope :).

Have a look here:
www.bunnyrabbitsex.com/?theme=7

See how my menu scrolls with you? It looks fine and dandy until you link to say, a post:
http://www.bunnyrabbitsex.com/index.php?topic=414.msg1907#msg1907 (make sure you clicked the other link so you're on the right theme :))

K@:
Works OK, for me, on both pages.

(Opera v12)

Jade Elizabeth:
I screwed my second link up, retry ha ha

Navigation

[0] Message Index

[#] Next page

Go to full version