doubledee — 2012-06-17T23:15:17-04:00 — #1
After a user logs in, I want to take them back to the Comments section on my Article page.
How do I do that when I do not want to take them to a link?
I tried adding an anchor in an Heading like this, but NetBeans complains...
chris_upjohn — 2012-06-17T23:37:23-04:00 — #2
You can simply anchor an element by an id, E.g. you can use xxx.com/mypage.php#comments then use the below
doubledee — 2012-06-18T00:35:15-04:00 — #3
Oh, okay. I was trying to use name instead.
mani0993 — 2012-06-18T07:53:10-04:00 — #4
As Chris said, the selector (id) will help in achieving what you need. You can also use jQuery to smoothen the scrolling (or jumping).
ralphm — 2012-06-18T09:04:11-04:00 — #5
Yes, the name= setup is outdated now. This is one of the main uses for ids (along with JS hooks). I don't use ids for styling at all now.