The process of show and hide the menu is done trought events. The cart_dropdown.js module listen to the event jse.libs.theme.events.CART_OPEN() and trigger the mouseenter event.
A exemple of how to handle this can be found at the cart_handler.js init function. Folow the code:
/**
* Init function of the widget
* @constructor
*/
module.init = function (done) {
var $forms = $this.find('form');
if (options.page === 'product-info') {
$forms.find("[name=btn-add-to-cart]").on('mouseup', _addToCartThrobberHandler);
$("body").on('CART_DROPDOWN_OPEN', _cartDropdownOpenHandler);
}
$forms.on('submit', { 'target': 'cart' }, _submitHandler).on('click', options.wishlistButtons, { 'target': 'wishlist' }, _submitHandler).on('click', options.priceOfferButtons, { 'target': 'price_offer' }, _submitHandler).on('change', options.attributes, { 'target': 'check' }, _submitHandler).on('blur', options.quantity, { 'target': 'check' }, function (e) {
_submitHandler(e);
}).on('keyup', options.quantity, { 'target': 'check' }, _keyupHandler);
// Fallback if the backend renders incorrect data
// on initial page call
$forms.not('.no-status-check').each(function () {
_submitHandler.call($(this));
});
done();
};