Brett Stimmerman![]()
The Back Button Utility for YUI 3 provides a simple API for detecting when a page is returned to via the back button. Arbitrary data can be stored on the page and retrieved when returning to the page.
The Back Button Utility is not a full-fledged history manager. Its sole purpose is to detect back button activity on a page-by-page basis.
<script src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.05.19-19-08'
}).use('gallery-back-button', function(Y) {
// #bb-data is a hidden text input
var BB = new Y.BackButton({storageNode: '#bb-data'});
BB.add('foo', 'bar');
BB.on('return', function (e) {
alert(e.data.foo); // => 'bar'
});
});No forum posts for this module.
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info