Skip Navigation

[Resolved] Can I use js_event_wpv_parametric_search_results_updated with vanilla JS?

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 3 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#2043289

I'm trying to slowly convert all my theme code and site to not need jQuery.

Is it possible to call the "js_event_wpv_parametric_search_results_updated" event without using jQuery? I can't seem to get it to work. This is my attempt:

document.addEventListener( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {
...
});

#2043957

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The thing is that Toolset uses jQuery internally, within the plugin source code and due to that you cannot get rid of jQuery on Toolset sites.

Even if you try to convert the event "js_event_wpv_parametric_search_results_updated" as normal JavaScript source code, it wont work. You have go with jQuery.

#2044887

Are there plans to eventually ditch jQuery in the Toolset plugins? I'd hope so, because it's a resource hog and a performance problem moving forward...

#2045685

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I do not see any plats to remove the jQuery from Toolset plugins and it will not be wise as number of user already build their site and using it.