With jQuery we have tried to provide a mechanism that only loads the jQuery library when absolutely necessary. If none of the modules or skin-objects on a page require jQuery, then it won’t be included in the page. If your module wants to use jQuery then you must include a long, complicated block of code that looks like this:
DotNetNuke Core Framework 4.x
Please note that DNN 6.1.0 removed the internal usage of the flag "jquery_registered". Although this was a common workaround, it was technically peeking around the public API, which is inherently an unsafe act. The more robust alternative is to use a method such as Bruce Chapmon has on his blog, which shows how to use jQuery and jQuery UI safely within DotNetNuke 4 5 and 6
Other tips about jQuery usage in DotNetNuke can be read here
jQuery UIIf you are looking for information related to DotNetNuke jQuery-UI specific plugins, please see Reusable-DotNetNuke-jQuery-Plugins.
As of DotNetNuke 6, jQuery-UI is also shipped (and integrated) with the core. When registering jQuery-UI, there is no need to register jQuery as the jQuery-UI registration method will handle this for you. You can register jQuery-UI for use in your own work by using the following code (in Page Load or Init):
A jQuery skin object was initially included with 6.0, however, as of 6.2 the following options are available.
For direct usage in .ascx skins:
<%@ Register TagPrefix="dnn" TagName="JQUERY" Src="~/Admin/Skins/jQuery.ascx" %>
<dnn:JQUERY ID="dnnjQuery" runat="server" />
HTML skin designers can use the JQUERY token:
The following properties for the skin object can be set to True/False (False by default):
- DnnjQueryPlugins - If true, the dnn plugins used for panels and tabs will be loaded in addition to jQuery and jQueryUI.
- jQueryHoverIntent - If true, the HoverIntent script used for tooltips will be loaded in addition to jQuery.
- jQueryUI - If true, jQueryUI will be loaded in addition to jQuery.