To opt into a more recent version of jQuery, you can add an htmlDependency
object pointing to your desired version, somewhere (anywhere) in your UI:
htmltools::htmlDependency("jquery", "3.3.1",
src = c(href = "https://code.jquery.com/"),
script = "jquery-3.3.1.min.js")
This example will serve jQuery 3.3.1 from the jQuery CDN. If your app needs to work with clients that won't be able to connect to the wider internet, you'll need to download the jquery-3.3.1.min.js file, put it in an app subdirectory (say, jquery
), and point to the directory using the src
argument.