Skip to content

Commit

Permalink
Fixed the JS so that the social items are hidden if their respective …
Browse files Browse the repository at this point in the history
…tab is not in focus
  • Loading branch information
Andrew Ellis committed Oct 3, 2011
1 parent 687fa1f commit 3f6c724
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions assets/social.js
Expand Up @@ -77,6 +77,8 @@

var className = $(this).attr('rel');
if (className == 'social-all') {
$('.social-items').show();

if (nextLink !== null) {
$nextLink.attr('href', nextLink);
}
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion views/comment/social_item.php
@@ -1,4 +1,4 @@
<div class="social-items <?php echo $service->key(); ?>">
<div class="social-items social-<?php echo $service->key(); ?>">
<div class="social-items-icon"><?php echo $service->social_items_icon(); ?></div>
<div class="social-items-comments">
<?php
Expand Down
1 change: 0 additions & 1 deletion views/comments.php
Expand Up @@ -126,7 +126,6 @@
<?php endif; ?>
</div>
</div>
<?php else: ?>
<?php endif; ?>
</div>
<!-- #Comments Tabs -->
Expand Down

0 comments on commit 3f6c724

Please sign in to comment.