Sha256: fd30990071f33719238e5fb37d0ef335037fa73f0ab26a07aa742488d37ffec5
Contents?: true
Size: 733 Bytes
Versions: 25
Compression:
Stored size: 733 Bytes
Contents
$(document).on('turbolinks:load', function() { $(function ($) { var $body = $('body'), $slice = $('#sidebar-footer .brand') // On click, capture state and save it in localStorage $($.AdminLTE.options.sidebarToggleSelector).click(function () { localStorage.setItem('sidebar', $body.hasClass('sidebar-collapse') ? 1 : 0); }); // On ready, read the set state and collapse if needed if (window.width >= 768){ if (localStorage.getItem('sidebar') === '0') { $body.addClass('disable-animations sidebar-collapse'); $slice.toggleClass('hidden') requestAnimationFrame(function () { $body.removeClass('disable-animations'); }); } } }); });
Version data entries
25 entries across 24 versions & 1 rubygems