aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/initialise_elgg.php
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-11 22:51:10 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-11 22:51:10 +0000
commit8fb8deb6c9d937cd862964bd5e30973c0a56ab2b (patch)
tree6fbb59624f64888d15646faeed26dcdc50b8ec24 /views/default/js/initialise_elgg.php
parent2b8a925a12155b5e7692b5ccb035d49d70ddde45 (diff)
downloadelgg-8fb8deb6c9d937cd862964bd5e30973c0a56ab2b.tar.gz
elgg-8fb8deb6c9d937cd862964bd5e30973c0a56ab2b.tar.bz2
Added a popup list of users for Likes.
git-svn-id: http://code.elgg.org/elgg/trunk@5684 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/js/initialise_elgg.php')
-rw-r--r--views/default/js/initialise_elgg.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/views/default/js/initialise_elgg.php b/views/default/js/initialise_elgg.php
index c7dbed4aa..4679f551c 100644
--- a/views/default/js/initialise_elgg.php
+++ b/views/default/js/initialise_elgg.php
@@ -53,8 +53,17 @@ $(document).ready(function () {
hoverClass: 'droppable-hover'
});
- $('.likes_list_button').click(function() {
- $(this).next('.likes_list').toggle();
+ // user likes
+ $(".likes_list_button").click(function(event) {
+ if ($(this).next(".likes_list").css('display') == 'none') { // show list
+ var topPosition = -$('.likes_list').height();
+ $('.likes_list').css('top',topPosition + 10);
+ $('.likes_list').css('left', -$('.likes_list').width()+40);
+ $(this).next(".likes_list").animate({opacity: "toggle", top: topPosition}, 500);
+ } else { // hide list
+ var topPosition = -$('.likes_list').height() + 5;
+ $(this).next(".likes_list").animate({opacity: "toggle", top: topPosition}, 500);
+ }
});
}); /* end document ready function */