From 8fb8deb6c9d937cd862964bd5e30973c0a56ab2b Mon Sep 17 00:00:00 2001 From: pete Date: Sun, 11 Apr 2010 22:51:10 +0000 Subject: Added a popup list of users for Likes. git-svn-id: http://code.elgg.org/elgg/trunk@5684 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/js/initialise_elgg.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'views/default/js') 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 */ -- cgit v1.2.3