]> git.immae.eu Git - github/wallabag/wallabag.git/blame - app/Resources/static/themes/baggy/js/closeMessage.js
Merge pull request #2309 from mruminski/2.1
[github/wallabag/wallabag.git] / app / Resources / static / themes / baggy / js / closeMessage.js
CommitLineData
0743287f
TC
1var $ = global.jquery = require('jquery');
2
3$(function () {
4 //---------------------------------------------------------------------------
5 // Show the close icon when the user hover over a message
6 //---------------------------------------------------------------------------
7 // $('.messages').on('mouseenter', function(){
8 // $(this).find('a.closeMessage').stop(true, true).show();
9 // }).on('mouseleave', function(){
10 // $(this).find('a.closeMessage').stop(true, true).hide();
11 // });
12 //---------------------------------------------------------------------------
13 // Close the message box when the user clicks the close icon
14 //---------------------------------------------------------------------------
15 $('a.closeMessage').on('click', function () {
16 $(this).parents('div.messages').slideUp(300, function () { $(this).remove(); });
17 return false;
18 });
19});