X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=app%2FResources%2Fstatic%2Fthemes%2Fbaggy%2Fjs%2FcloseMessage.js;h=ae4b179127972d03e259a7cbf56b61a2264aa783;hb=0743287f955fd19fd1a04c91f3b40a4ac2236423;hp=527719d5a07837b29f1b9595dde451bd063adeff;hpb=5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/Resources/static/themes/baggy/js/closeMessage.js b/app/Resources/static/themes/baggy/js/closeMessage.js index 527719d5..ae4b1791 100644 --- a/app/Resources/static/themes/baggy/js/closeMessage.js +++ b/app/Resources/static/themes/baggy/js/closeMessage.js @@ -1,17 +1,19 @@ -$(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 +var $ = global.jquery = require('jquery'); + +$(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; + }); +});