the only problem is it doesn't bring me to the div I need to be at.. say I do page.php#four it should go to the bottom of the page, but it doesn't, it opens the main div, but doesn't go to the selected id
The name tag was not for the divs it was for the <a> tags. If you want to use the <div> with ids use the offset method. You shouldn't need to change the html. The part I do not understand is about the "funky stuff". You can debug this just put an alert on the offset.top and offset.left and check the values.
I tried putting the name tags on the <a> tags but it didn't do anything.
I added the alerts for the offsets and they give some numbers that don't really mean much to me but do show they are working in the sense that it gives a different location for each link.
The 'funky stuff' I'm referring to is that the page loads horrible. Instead of loading the div at the offset the page starts its load there, meaning if the offset top is 300, then header is pushed down 300.
I thought it might be something about the $(html,body) but am not sure how to go about fixing that.
Msg#: 4439312 posted 8:14 am on Apr 14, 2012 (gmt 0)
meaning if the offset top is 300, then header is pushed down 300.
Can you first setup a simple html document to test the code? It's possible there are ID conflicts. Make sure identifiers are unique <div id=four">content</div> id="four" should be unique throughout the document. If you still see the problem post the whole html code you test.