oliiix Posted September 1, 2016 Share Posted September 1, 2016 Hi I have a little jquery snippet i'd like to run at page load. Thing is, it's not being run when I select a filter in the layered navigation block. I tried the solution found under following link: https://www.prestashop.com/forums/topic/261175-solved-how-to-add-javascript-code-to-run-after-the-block-layered-is-done-loading/ I added my code inside blocklayered.js nearly everywhere for testing purposes, especially the locations where the forum post mentioned earlier specified (blocklayered.js:updateProductUrl()). But it's kinda not working :S Here's the code that I'd like to run. It simply removes the first two numbers of each feature value which I used so the feature values are in the correct order. It works as long as one does not select any layered nav block filter: var regex = /^[0-9][0-9] /; $('div.layered_filter ul.layered_filter_ul label a').each(function() { if ($(this).html().match(regex)) { $(this).html($(this).html().slice(3)); } }); Thanks for trying to help Oli Link to comment Share on other sites More sharing options...
oliiix Posted September 6, 2016 Author Share Posted September 6, 2016 (edited) Suddenly it works as the thread mentioned in my first post describes. Maybe it was cache related (of course I turned off all caching inside the shop).. Edited September 6, 2016 by oliiix (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now