Orbit/public/javascripts/application.js

21 lines
570 B
JavaScript
Raw Normal View History

2010-03-08 08:04:05 +00:00
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
2011-05-13 01:08:42 +00:00
$(function () {
$('#sidebar a, #main a').live('click',
function () {
$.getScript(this.href);
history.pushState(null, document.title, this.href);
return false;
}
);
$('.form').live('submit', function () {
$.post(this.action, $(this).serialize(), null, 'script');
return false;
});
$(window).bind("popstate", function () {
$.getScript(location.href);
});
});