I am learning about history in HTML5, in this example (open the JavaScript browser console to see error) the event.state.url returns:
Uncaught TypeError: Cannot read property 'url' of undefined
Look and help: http://jsfiddle.net/un4Xk/
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
eventis the jQuery event object, not the DOM one.To access the DOM event object, use
event.originalEvent: http://jsfiddle.net/pimvdb/un4Xk/1/.Remember that the state is only defined when the new state has data, so it is not available when clicking and then going back to the initial state:
It is, however, available when clicking, clicking another time and then going back: