Cart popup open with hover

6 replies · opened Feb 1, 2017

JjohnjohnFeb 1, 2017

Hello,

At the moment, the cart popup only shows up with a click.
Is it possible to have it open on mouse-hover? (and only on desktop view)

thank you

JjohnjohnFeb 7, 2017

Hello, is the above possible?

Thank you

SSemicolon WebSTAFFFeb 8, 2017

Hello,

This is Definitely Possible but it is only possible to open the Top Cart Content on Mouseover. You will still need to Click to close it. Simply update the topcart: function() Function Block in the js/functions.js File with the following code:

topcart: function(){

	$("#top-cart-trigger").click(function(e){
		$pagemenu.toggleClass('pagemenu-active', false);
		$topCart.toggleClass('top-cart-open');
		e.stopPropagation();
		e.preventDefault();
	});

	if( $body.hasClass('device-lg') || $body.hasClass('device-md') ) {
		$("#top-cart-trigger").hover( function(e){
			$topCart.toggleClass('top-cart-open', true);
		});
	}

}

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

JjohnjohnFeb 8, 2017

Thank you for the help!
Is there any way to use mouseout/mouseleave or other event to hide the cart popup?

SSemicolon WebSTAFFFeb 8, 2017

Hello,

Clicking outside the Cart Area will automatically hide the Popup but unfortunately Mouseleave currently is not supported owing to the Current Structure of the Top Cart area. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

JjohnjohnFeb 8, 2017

what would be the easiest way to trigger the cart to open when i add a product to the cart though?

SSemicolon WebSTAFFFeb 12, 2017

Hello,

You can simply use the following Javascript Code to trigger open the Cart:

jQuery('#top-cart').toggleClass('top-cart-open', true);

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard