From 18a67ffdc21e44e21363f863b1a31d74b98ee3eb Mon Sep 17 00:00:00 2001 From: jessib Date: Fri, 16 Nov 2012 15:31:48 -0800 Subject: playing around with pjax-rails but not using it yet --- app/assets/javascripts/application.js | 5 +++++ app/views/layouts/application.html.haml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index dc975d4..36a9979 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -16,3 +16,8 @@ //= require users //= require_tree . //= require bootstrap +//= require jquery.pjax + +$(function() { + $('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]'); +}); \ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index e3b7977..b0644f2 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -19,5 +19,6 @@ .row .span12 = render 'layouts/messages' # TODO: In firefox, these are hidden by header - = yield + %div{"data-pjax-container" => ""} + = yield %footer -- cgit v1.2.3