- WE realize this isn't always possible, but in my opinion it should be striven for in developing any public website.
- Just don't have a
- Simple code example
WE would honestly suggest neither. WE would use a stylized for that behavior.
This way we can assign your onclick. We also suggest binding via script, not using the onclickattribute on the element tag. The only gotcha is the pseudo 3d text effect in older IEs that cannot be disabled.
- Will always intercept in case your onclick event fails.
- Will not have errant load calls happen, or trigger other events based on a hash change
- The hash tag can cause unexpected behavior if the click falls through (onclick throws), avoid it unless it's an appropriate fall-through behavior, and we want to change the navigation history.