[Skip to main content](#vessel-content)

#   Trigger when filtering is done

##

- **[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")**
- [![FilipHradil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36153-filiphradil "View FilipHradil's Profile") Topic Author
- [ Offline](/forum/user/36153-filiphradil)

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 1 month ago [\#311553](#311553) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  *[Trigger when filtering is done](/forum/45-filters-search/898401-trigger-when-filtering-is-done#311553 "-- HikaShop version -- : 4.2.3  Hello!  I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?  I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.  Thank you in advance many times! Filip")* was created by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")*

-- HikaShop version -- : 4.2.3

Hello!

I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?

I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.

Thank you in advance many times!
Filip

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5ODQwMS10cmlnZ2VyLXdoZW4tZmlsdGVyaW5nLWlzLWRvbmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile")
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

7 years 1 month ago [\#311555](#311555) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Trigger when filtering is done](/forum/45-filters-search/898401-trigger-when-filtering-is-done#311555 "-- HikaShop version -- : 4.2.3  Hello!  I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?  I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.  Thank you in advance many times! Filip")*

Hi,

There is a trigger filters.updated which you can use.
Code:

window.Oby.registerAjax("filters.updated",function(params){ ....Your function here.... });

You can find more about this in this topic: [ www.hikashop.com/forum/filters-search/89...iltering.html#308760](https://www.hikashop.com/forum/filters-search/897866-no-ajax-filtering.html#308760)

Hope that helps.

Thans

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile"), [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5ODQwMS10cmlnZ2VyLXdoZW4tZmlsdGVyaW5nLWlzLWRvbmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")**
- [![FilipHradil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36153-filiphradil "View FilipHradil's Profile") Topic Author
- [ Offline](/forum/user/36153-filiphradil)

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 1 month ago [\#311561](#311561) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  Replied by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")* on topic *[Trigger when filtering is done](/forum/45-filters-search/898401-trigger-when-filtering-is-done#311561 "-- HikaShop version -- : 4.2.3  Hello!  I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?  I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.  Thank you in advance many times! Filip")*

Thank you so much for advice! It works perfectly. I resolved my issue thanks to your solution.

If somebody needs to scroll up to 1st product after filtering (for example: if you have filters in sidebar as me), here is my code:

Code:

window.Oby.registerAjax("filters.updated",function(params){ jQuery('html, body').animate({ scrollTop: jQuery('.hikashop_products').offset().top }, 1000, 'easeOutExpo' ); });

Thank you, once again!
F.

The following user(s) said Thank You: [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5ODQwMS10cmlnZ2VyLXdoZW4tZmlsdGVyaW5nLWlzLWRvbmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

7 years 1 month ago [\#311560](#311560) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Trigger when filtering is done](/forum/45-filters-search/898401-trigger-when-filtering-is-done#311560 "-- HikaShop version -- : 4.2.3  Hello!  I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?  I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.  Thank you in advance many times! Filip")*

Hi,

We actually have added an option to the filter module to do that for the next version of HikaShop which is to be released soon.
So I would recommend to wait for a few more days and just activate that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5ODQwMS10cmlnZ2VyLXdoZW4tZmlsdGVyaW5nLWlzLWRvbmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")**
- [![FilipHradil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36153-filiphradil "View FilipHradil's Profile") Topic Author
- [ Offline](/forum/user/36153-filiphradil)

Less More

- Posts: 217
- Thank you received: 4
-
-

7 years 1 month ago [\#311682](#311682) by [FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")  Replied by *[FilipHradil](/forum/user/36153-filiphradil "View FilipHradil's Profile")* on topic *[Trigger when filtering is done](/forum/45-filters-search/898401-trigger-when-filtering-is-done#311682 "-- HikaShop version -- : 4.2.3  Hello!  I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?  I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.  Thank you in advance many times! Filip")*

Thank you for information.

Have a nice day,
Filip

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg5ODQwMS10cmlnZ2VyLXdoZW4tZmlsdGVyaW5nLWlzLWRvbmU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
