Sha256: 9ee340a488dbfe47b9a28a8d87d894dc1288f54c7e669d16c88091138c43290a
Contents?: true
Size: 592 Bytes
Versions: 8
Compression:
Stored size: 592 Bytes
Contents
(function() { "use strict"; var body, links; App.register('component').enter(function() { body = $('body'); links = $('a[href]:not([href^="#"]):not([target="_blank"])'); // Add 'loading' class to the body when a link is clicked, // add add 'active' class to the clicked link. links.click(function() { links.removeClass('active'); body.addClass('loading'); $(this).addClass('active'); }); }).exit(function() { // Remove the classes when the body is unloaded body.removeClass('loading'); links.removeClass('active'); }); })();
Version data entries
8 entries across 8 versions & 2 rubygems