Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Dropdown Shopping Cart(SKU# FLEX-00001)

TOPIC: Change cart mouse behavior from hover to click

Change cart mouse behavior from hover to click 8 years 11 months ago #8848

Hi I would like to change my mouse bahavior on cart, from hover to click ?
I try to change jQuery from $('#vmCartModule').hover to $('#vmCartModule').click but not luck ...
Any tip how to do that ?
Thanks a lot
R.
The administrator has disabled public write access.

Change cart mouse behavior from hover to click 8 years 11 months ago #8861

Hi,

changing the .hover to .click won't work and will cause a Syntax error. Because click and hover doesn't have the same scheme.

The original code is this:
        $('#vmCartModule').hover(
	   function(){ 
	   		$('#product_list').stop(true, true).fadeIn(300);
			$('#vmCartModule').stop(true, true).addClass('carthover');
	    },
	   function(){ 
	   		$('#product_list').stop(true, true).delay(500).queue(function(next){
				$(this).fadeOut(300);
				$('#vmCartModule').removeClass('carthover');
				  next();
				});
	   }
        )

Replace it with this:
        $('#vmCartModule').click(function() {
		$('#product_list').fadeToggle('fast');
		$(this).toggleClass('carthover');
	});

And the dropdown will FadeIn when "clicked" and FadeOut when "re-clicked".

If you like DropDown Shopping Cart and satisfied with the support you have received, please "write a review" on:
www.flexiblewebdesign.com/Virtuemart-Modules/Virtuemart-DropDown-Shopping-Cart

Rate DropDown Shopping Cart and write a couple of sentences to share your experience with the support team. It won't take more than 2 minutes from you but it is extremely important for us. Thanks in advance!


Regards,
Support
Last Edit: 8 years 11 months ago by Support.
The administrator has disabled public write access.

Change cart mouse behavior from hover to click 8 years 11 months ago #8876

Awesome! Thanks for fast support.
Wish you guys the best, Robin.
The administrator has disabled public write access.

Change cart mouse behavior from hover to click 8 years 11 months ago #8892

sure, your welcome.

Case solved. Topic closed.

Regards,
support
The administrator has disabled public write access.

Change cart mouse behavior from hover to click 7 years 3 months ago #13186

Hi guys,
file structure was changed, now it uses hoverIntent jQuery Plug-in, any idea how to change code for cart have clicking behavior?
Thanks a for support
Robin
The administrator has disabled public write access.

Change cart mouse behavior from hover to click 7 years 3 months ago #13194

The same idea. The structure/scheme hasn't been changed at all. Just the .hover() has been replaced by .hoverIntent() because it gives better UX.

Remove all the functions inside the . hoverIntent() function (just like you did with .hover() in the past) and replace with the .click() function that was provided in the initial reply.

Regards.
Last Edit: 7 years 3 months ago by Support.
The administrator has disabled public write access.
Time to create page: 0.046 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo