Closed Triloworld closed 1 year ago
There is 5 menu-link
handlers.
Nees unique names to disable only sending request. We do it on button
Hello! We have made some changes to the name of event handlers (click). Now you can detach the click event handler on the filter buttons using the construct, for example: $("#element").off("click.ymc_smart_filter"); The name of the handler for all elements (buttons) is click.ymc_smart_filter. We hope this will help you in solving your task.
I mean that this file:
https://github.com/YMC-22/smart-filter/blob/main/includes/assets/js/script.js
haveclick
(and other too) handlers described like this example:.on('click',
(https://github.com/YMC-22/smart-filter/blob/main/includes/assets/js/script.js#L854)Should be like this example (name can be different) :
.on('click.ymc_smart_filter',
This will enable manage handlers as they have names. Work as namespace in jQuery
We have one field that requires it to be added as two separate fields and work independently. Now we cannot remove smart filters without a rewiring function. When namespace will be added we can remove the handler by name and add our to have part with activate more filters and separate to send requests.