Saltar navegación

[Resuelto] Can I use js_event_wpv_parametric_search_results_updated with vanilla JS?

This support ticket is created hace 4 años, 1 mes. 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)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Minesh hace 4 años, 1 mes.

Asistido por: Minesh.

Autor
Mensajes
#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
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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.