[eluser]Bramme[/eluser]
[quote author="elitemedia" date="1212194761"][quote author="mrapples" date="1212194612"]You can use jQuery's bind function to achieve this like so:
Code:
<span id="hist">Back</span>
$("#hist").bind('click', function() {
history.back();
});
[/quote]
Ho thanks, that was really more simple that I thought ![/quote]
you can do that even shorter
Code:
<span id="hist">Back</span>
$("#hist").click(function() {
history.back();
});
More semantically correct would be (imo)
Code:
<a id="hist">Back</a>
$("#hist").click(function() {
history.back();
return false;
});
The return false is so the page won't actually follow the link. Though I don't know if it's necessary with the history back thing. You should try it out.