3 Jappix - An open social platform
4 These are the bubble JS scripts for Jappix
6 -------------------------------------------------
10 Last revision: 11/12/10
14 // Closes all the opened bubbles
15 function closeBubbles() {
16 // Destroy all the elements
17 $('.bubble.hidable:visible').hide();
18 $('.bubble.removable').remove();
19 $('body').die('click');
24 // Click function when a bubble is opened
25 function showBubble(selector) {
26 // Hidable bubbles special things
27 if($(selector).is('.hidable')) {
28 // This bubble is yet displayed? So abort!
29 if($(selector).is(':visible'))
30 return closeBubbles();
32 // Close all the bubbles
35 // Show the requested bubble
39 // Removable bubbles special things
41 // This bubble is yet added? So abort!
43 return closeBubbles();
45 // Close all the bubbles
49 // Creates a new click event to close the bubble
50 $('body').live('click', function(evt) {
51 var target = evt.target;
53 // If this is a click away from a bubble
54 if(!$(target).parents('.ibubble').size())