updated js for nice smooth effects

This commit is contained in:
Joe Sak 2010-11-20 15:57:18 -06:00
parent ef60c3df70
commit bfcc70edfc

View file

@ -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;