Skip to content

Instantly share code, notes, and snippets.

@nicco88
Last active February 24, 2017 01:52
Show Gist options
  • Save nicco88/dc6dc8c7686a216c1395c34d23ea2e97 to your computer and use it in GitHub Desktop.
Save nicco88/dc6dc8c7686a216c1395c34d23ea2e97 to your computer and use it in GitHub Desktop.
minicartTesting.js
// cart simulation
$('#emptyCartWarningContainer').toggleClass('displayNone');
$('.flexibleCartContent').toggleClass('displayNone');
$('ul.mainCartSections').toggleClass('displayNone');
$('ul.mainCartSections > li > a').toggleClass('displayNone');
// Script controlling cart's scrollbar
var myUl = $('#mini-shopping-cart > ul');
var timeout = null;
$(myUl).on('mousemove scroll', function() {
clearTimeout(timeout);
myUl.css('overflowY', 'auto');
timeout = setTimeout(function() {
myUl.css('overflowY', 'hidden');
}, 1300);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment