Commit 9feb8657 authored by Taddeus Kroes's avatar Taddeus Kroes

Added some comments.

parent aba93998
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
load_content(url); load_content(url);
} }
}, },
// Compare the current hash to the url in a short interval
// to allow browsing with forward/backward links
interval, interval,
reset_interval = function() { reset_interval = function() {
clearInterval(interval); clearInterval(interval);
...@@ -27,6 +29,7 @@ ...@@ -27,6 +29,7 @@
if( url == '' ) if( url == '' )
url = location.hash = 'pages'; url = location.hash = 'pages';
// Assert instant response to hashtag links
$('a[href^=#]').live('click', function() { $('a[href^=#]').live('click', function() {
reset_interval(); reset_interval();
refresh_url($(this).attr('href').substring(1)); refresh_url($(this).attr('href').substring(1));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment