Using Jquery in app

I’ve frequently run into situations where I need to add my custom javascript to bubble, eg making complex financial charts or complex animations. I try to use as minimal libraries as possible, but the one library I can’t really get avoid is jquery. I know Bubble already requires javascript on the app, and in principle I don’t have to add it myself. The trouble I keep running into is unless I explicitly require jquery in my Page’s HTML header, my custom javascript doesn’t work, and when I do add my own jquery it often causes other thinsg to break on the page.

So I wanted to know what is the proper way of usign jquery in bubble, when I have my own javascript that requires it.

You should create a plugin instead. You can include jquery if needed (the checkbox for jquery is checked by default I think). Bubble will avoid to add jquery multiple time on the page this way. Most of the time this is what causing issue.

Thanks that was my suspicion, only problem I have with the plugins is how do i deal with adding my own html?

I can easily use jquery to add a few html elements, but if I’ve got a 800 lines of html, how would I do that on the plugins?

This topic was automatically closed after 70 days. New replies are no longer allowed.