Re:Ask HN: the current state of the empty # in 'a href'
by keyle on Sunday March 27, 2011 @04:17AM
(#2374524)
what about href='' and in the jquery onclick function, return false at the end?
[ Parent
| on HN ]
Re:Ask HN: the current state of the empty # in 'a href'
by chime on Sunday March 27, 2011 @08:02AM
(#2374781)
href='' will reload the current page in most browsers if the JS code hasn't loaded yet (waiting for $(function(){}) to fire) or has an error for some reason. href='#' will at least prevent that. Returning false form jQuery works.