Skip to content

Commit

Permalink
improvement: partly auto hide left menu panel on viewport width less …
Browse files Browse the repository at this point in the history
…than 900px (LMS #1420) - clear pending animations' queue
  • Loading branch information
chilek committed Oct 11, 2018
1 parent 467b11b commit 6e1c55e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions templates/default/menu-panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,20 @@
$(function() {
$('#lms-ui-menu-panel').on('mouseenter touchstart', function () {
if ($('#lms-ui-menu-panel').css('--lms-mobile')) {
$(this).clearQueue();
$(this).animate({
$(this).clearQueue().animate({
width: '12em'
});
}
}).on('mouseleave', function () {
if ($('#lms-ui-menu-panel').css('--lms-mobile')) {
$(this).clearQueue();
$(this).animate({
$(this).clearQueue().animate({
width: '3em'
});
}
});
$('#lms-ui-contents').on('mouseenter touchstart', function () {
if ($('#lms-ui-menu-panel').css('--lms-mobile')) {
$(this).clearQueue();
$('#lms-ui-menu-panel').animate({
$('#lms-ui-menu-panel').clearQueue().animate({
width: '3em'
});
}
Expand Down

0 comments on commit 6e1c55e

Please sign in to comment.