]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/closeMessage.js
Add LiipThemeBundle
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / baggy / public / js / closeMessage.js
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/closeMessage.js b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/closeMessage.js
new file mode 100644 (file)
index 0000000..527719d
--- /dev/null
@@ -0,0 +1,17 @@
+$(function(){
+     //---------------------------------------------------------------------------
+     // Show the close icon when the user hover over a message 
+     //---------------------------------------------------------------------------
+     // $('.messages').on('mouseenter', function(){
+     //      $(this).find('a.closeMessage').stop(true, true).show();
+     // }).on('mouseleave', function(){
+     //      $(this).find('a.closeMessage').stop(true, true).hide();
+     // });
+     //---------------------------------------------------------------------------
+     // Close the message box when the user clicks the close icon
+     //---------------------------------------------------------------------------
+     $('a.closeMessage').on('click', function(){
+          $(this).parents('div.messages').slideUp(300, function(){ $(this).remove(); });
+          return false;
+     });
+});
\ No newline at end of file