Obtain 'jQuery' as an HTML Dependency Object

Obtain any major version of 'jQuery' (< https://code.jquery.com/>) and use it in any webpage generated by 'htmltools' (e.g. 'shiny', 'htmlwidgets', and 'rmarkdown'). Most R users don't need to use this package directly, but other R packages (e.g. 'shiny', 'rmarkdown', etc.) depend on this package to avoid bundling redundant copies of 'jQuery'.


R-CMD-check CRANstatus

jquerylib

Obtain ‘jQuery’ as an HTML dependency object

Installation

jquerylib can be installed with:

install.packages("jquerylib")

Usage

The jquerylib package currently has one function,jquery_core(), which returns a htmltools::htmlDependency() object that bundles a stable version of jQuery Core. Here we use it to obtain jQuery 3.x, but currently 2.x and 1.x are also supported. You likely won’t need to use this package directly, but packages like shiny and rmarkdown will eventually use this package to avoid bundling redundant copies jQuery.

jquerylib::jquery_core(3)
## List of 10
##  $ name      : chr "jquery"
##  $ version   : chr "3.6.0"
##  $ src       :List of 1
##   ..$ file: chr "lib/3.6.0"
##  $ meta      : NULL
##  $ script    : chr "jquery-3.6.0.min.js"
##  $ stylesheet: NULL
##  $ head      : NULL
##  $ attachment: NULL
##  $ package   : chr "jquerylib"
##  $ all_files : logi TRUE
##  - attr(*, "class")= chr "html_dependency"

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("jquerylib")

0.1.4 by Carson Sievert, 5 years ago


Browse source code at https://github.com/cran/jquerylib


Authors: Carson Sievert [aut, cre] , Joe Cheng [aut] , RStudio [cph] , jQuery Foundation [cph] (jQuery library and jQuery UI library) , jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/lib/jquery-AUTHORS.txt)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports htmltools

Suggests testthat


Imported by DT, NestedMenu, bookdown, bslib, freewall, jsTreeR, leaflet, rmarkdown.


See at CRAN