26.1 ADD_3RD_PARTY_LIBRARY_FILE Procedure

This procedure adds the script tag to load a third-party JavaScript library file and also takes into account the specified CDN (content delivery network) for the application.

Supported libraries include:

  • jQuery
  • jQueryMobile
  • jQueryUI

Syntax

APEX_JAVASCRIPT.ADD_3RD_PARTY_LIBRARY_FILE ( 
    p_library    IN VARCHAR2, 
    p_file_name  IN VARCHAR2, 
    p_directory  IN VARCHAR2 DEFAULT NULL, 
    p_version    IN VARCHAR2 DEFAULT NULL ); 

Parameters

Table 26-1 ADD_3RD_PARTY_LIBRARY_FILE Parameters

Parameters Description
p_library Use one of the c_library_* constants.
p_file_name Specifies the file name without version, .min, and .css
p_directory (Optional) Directory where the file p_file_name is located.
p_version (Optional) If no value is provided, then uses the same version shipped with APEX.

Example

This example loads the JavaScript file of the Draggable feature of jQuery UI.

apex_javascript.add_3rd_party_library_file (
     p_library   =>apex_javascript.c_library_jquery_ui,
     p_file_name => 'jquery.ui.draggable' )