diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/refinerycms-blog.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/public/javascripts/refinerycms-blog.js b/public/javascripts/refinerycms-blog.js new file mode 100644 index 0000000..f55e279 --- /dev/null +++ b/public/javascripts/refinerycms-blog.js @@ -0,0 +1,22 @@ +$(document).ready(function(){ + height = $('#show_blog_post').height(); + $('#show_blog_post').height(height); + $('#next_prev_article a:not(".home")').click(function(){ + url = this.href + ".js"; + nav_url = $(this).attr('data-nav-url'); + $('#show_blog_post, #next_prev_article').fadeOut(); + $.ajax({ + url: url, + success: function(data) { + $('#show_blog_post').html(data).fadeIn().height('auto'); + $.ajax({ + url: nav_url, + success: function(data) { + $('#next_prev_article').html(data).fadeIn(); + } + }) + } + }); + return false; + }) +})
\ No newline at end of file |