Jump to content

[SOLVED] My javascript stops working when filters applied


Recommended Posts

Prestashop 1.5

 

Okay, so I have a custom piece of Javascript that I've added to the category page using a CategoryController override.

 

It's a fairly basic script that just displays product information when the image is hovered, then hides it again when the mouse leaves the image.

It works great, until you apply a filter, once the filter is applied, it stops working.

 

In addition, if you remove all active filters, the script does not resume working, it continues to not work.

 

I have noticed that applying filters adds a '#' to the end of the category URL and leaves it there when you remove the filters... though I don't suspect this is the problem.

 

My script is basically:

$(function(){
$(".ajax_block_product").hover(function(){
	$(this).find(".list_product_details").slideToggle("slow");
});
});

 

JD.

Edited by jd.creative (see edit history)
Link to comment
Share on other sites

I finally worked it out.

 

I created an override JS for the layered navigation and put my script in it's document.ready() function, but that didn't work, I then found the updateProductUrl() function, and added it there instead, no it works beautifully :)

 

JD.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...