I have a website that is on a slide show and when the user presses the back button I would like it to go back to the album view not the prior and prevent page. Is there a way of doing this? thanks for any help or advice.
jQuery Address provides strong cross-browser support for browser history and Ajax crawling:
http://www.asual.com/jquery/address
http://github.com/asual/jquery-address
Greetings
UPDATE:
you can find a good sample right here:
http://jsfiddle.net/5L6Ur/10/
some code in short:
$(function() {
$('a').click(function(e) {
e.preventDefault();
$.address.value($(this).attr('href'));
});
var changecount = 0;
$.address.change(function(e) {
if (typeof e !== 'function') {
$('span').html(changecount++);
}
});
});
You should:
location.hash
when page state changes. location.hash
changed by user (for example, by pressing back button) render
appropriate page contents.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With