aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2010-11-20 15:57:18 -0600
committerJoe Sak <joe@joesak.com>2010-11-20 15:57:18 -0600
commitbfcc70edfc00604c324fc7421e192a79a5bad123 (patch)
tree8cd1e08e54a19f4d6cca14a66cee470ad16b2ca4 /public
parentef60c3df70f20c6c806daff39a7bb15026bf80ef (diff)
downloadrefinerycms-blog-bfcc70edfc00604c324fc7421e192a79a5bad123.tar.gz
refinerycms-blog-bfcc70edfc00604c324fc7421e192a79a5bad123.tar.bz2
refinerycms-blog-bfcc70edfc00604c324fc7421e192a79a5bad123.zip
updated js for nice smooth effects
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/refinerycms-blog.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/public/javascripts/refinerycms-blog.js b/public/javascripts/refinerycms-blog.js
index c5512d2..5573915 100644
--- a/public/javascripts/refinerycms-blog.js
+++ b/public/javascripts/refinerycms-blog.js
@@ -1,12 +1,21 @@
$(document).ready(function(){
- $('#next_prev_article a:not(".home")').live('click',function(){
+ $('#show_blog_post').height($('#show_blog_post').height());
+
+ $('#next_prev_article a:not(".home")').live('click', function(){
url = this.href + ".js";
nav_url = $(this).attr('data-nav-url');
- $('#show_blog_post').fadeOut();
+ $('#show_blog_post > *').fadeOut();
$.ajax({
url: url,
success: function(data) {
- $('#show_blog_post').html(data).fadeIn();
+ $('#show_blog_post').html(data);
+ new_height = 0;
+ $('#show_blog_post > *').each(function(){
+ new_height += $(this).height()
+ });
+ $('#show_blog_post').animate({
+ height: new_height
+ });
}
});
return false;