Page 1 of 1

Does Web Author Provide jQuery Support?

Posted: Wed Sep 20, 2023 8:44 pm
by dreifsnider
Hi,

I'm curious if Web Author natively supports/includes jQuery? I am developing a JS plugin and was wondering if I can use jQuery syntax and selectors.

If it doesn't, what's the best way to include support for jQuery?

Thanks!

Daniel

Re: Does Web Author Provide jQuery Support?

Posted: Thu Sep 21, 2023 2:23 pm
by Gabriel Titerlea
Hello,
At the moment JQuery is loaded in Web Author, but we won't guarantee that it will be available in future versions.
The best approach would be to package JQuery yourself, with the plugin code. And use JQuery.noconflict to avoid JQuery version conflicts.
Best,
Gabriel

Re: Does Web Author Provide jQuery Support?

Posted: Fri Sep 22, 2023 3:48 am
by dreifsnider
Hi Gabriel,

Thank you for your reply. I will investigate packaging jQuery alongside the plugin code. I would like to avoid having to package it for every plugin that we build, so I'm wondering if we could create a plugin that only contains jQuery but is still available to other plugins. Perhaps we could use the WebappStaticResourcesFolder plugin extension to add the min file to a resources folder.

Thanks for the tip about using Jquery.noconflict too.

Daniel

Re: Does Web Author Provide jQuery Support?

Posted: Fri Sep 22, 2023 1:53 pm
by Gabriel Titerlea
Hello,

You can expose a WebappStaticResourcesFolder in a plugin and load jquery from that folder by writing a script tag in the oxygen.html file.

Best,
Gabriel