From 3f6c7243482af45ac403b2a6f5e3aa43b97f3269 Mon Sep 17 00:00:00 2001 From: Andrew Ellis Date: Mon, 3 Oct 2011 09:58:05 -0600 Subject: [PATCH] Fixed the JS so that the social items are hidden if their respective tab is not in focus --- assets/social.js | 7 +++++++ views/comment/social_item.php | 2 +- views/comments.php | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/social.js b/assets/social.js index a53f6ffd..3e64db85 100755 --- a/assets/social.js +++ b/assets/social.js @@ -77,6 +77,8 @@ var className = $(this).attr('rel'); if (className == 'social-all') { + $('.social-items').show(); + if (nextLink !== null) { $nextLink.attr('href', nextLink); } @@ -87,6 +89,11 @@ $('.social-commentlist li').removeClass('social-comment-collapse'); } else { + $('.social-items').hide(); + if ($('.social-items.'+className).length) { + $('.social-items.'+className).show(); + } + $('.social-commentlist li').each(function() { if (!$(this).hasClass(className)) { $(this).addClass('social-comment-collapse'); diff --git a/views/comment/social_item.php b/views/comment/social_item.php index 5be7e129..d343681d 100644 --- a/views/comment/social_item.php +++ b/views/comment/social_item.php @@ -1,4 +1,4 @@ -
+ -