Skip to content

Commit b706c04

Browse files
committed
docs: updated content and fix code snippets
1 parent f8ee17e commit b706c04

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

integration/jquery/using-jquery.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,31 @@ You can disable the jQuery scripts our controls bring by default via the followi
6666

6767
1. Load the custom version of jQuery you want to use. At this point you have the jQuery embedded in the Telerik controls and the custom one that is loaded via the following code. Proceed to the next step if you want to replace the embedded version with the custom one.
6868

69-
**ASP.NET**
70-
69+
````ASPX
7170
<head>
72-
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
73-
...
71+
<script
72+
src="https://code.jquery.com/jquery-3.7.1.min.js"
73+
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="
74+
crossorigin="anonymous"></script>
7475
</head>
75-
76+
````
7677

7778
1. Disable the embedded jQuery library as described in [Disabling the embedded jQuery]({%slug scriptmanager/disabling-the-embedded-jquery%}) help article.
7879

7980
1. Configure the ScriptReferences in **RadScriptManager** as shown in following sample. The script that integrates the external jQuery library in our client-side library is located in the file **jQueryExternal.js**.
8081

81-
**ASP.NET**
82-
83-
<telerik:RadScriptManager runat="server" ID="RadScriptManager2" EnableEmbeddedjQuery="false">
82+
````ASPX
83+
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableEmbeddedjQuery="false">
8484
<Scripts>
8585
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
8686
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryExternal.js" />
8787
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryPlugins.js" />
8888
</Scripts>
8989
</telerik:RadScriptManager>
90+
````
91+
92+
You can find a demonstration in the following video:
93+
<iframe width="560" height="315" src="https://www.youtube.com/embed/krq1zMFIezA?si=p9xGj92efVweL2TW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
9094

9195

9296
>important The Telerik controls depend on the specific version of jQuery they are tested against (above you can check the version that is used in each release of UI for ASP.NET AJAX). It is possible that using an older version of jQuery or a version, greater than the latestone from the [jQuery Version History in Telerik UI Controls](#jquery-version-history-in-telerik-ui-controls) section, will break the controls.
@@ -104,16 +108,17 @@ Fortunately there are easy ways to enable back the **$ alias.** Choose one of th
104108

105109
* Using a global variable
106110

107-
**JavaScript**
111+
````JavaScript
108112

109113
<script type="text/javascript">
110114
window.$ = $telerik.$;
111115
</script>
116+
````
112117

113118

114119
* Using a self-calling anonymous function (**Example 1**):
115120

116-
**JavaScript**
121+
````JavaScript
117122

118123
<script type="text/javascript">
119124
(function ($) {
@@ -123,30 +128,31 @@ Fortunately there are easy ways to enable back the **$ alias.** Choose one of th
123128
);
124129
})($telerik.$);
125130
</script>
131+
````
126132

127133

128134
* Using the **$telerik.$** alias:
129135

130-
**JavaScript**
136+
````JavaScript
131137

132138
<script type="text/javascript">
133139
$telerik.$(document).ready(function () {
134140
alert("Document is ready");
135141
});
136142
</script>
137-
143+
````
138144

139145
* Include a script reference to the **Telerik.Web.UI.Common.jQueryInclude.js**:
140146

141-
**ASP.NET**
147+
````ASPX
142148

143149
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
144150
<Scripts>
145151
......
146152
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
147153
</Scripts>
148154
</telerik:RadScriptManager>
149-
155+
````
150156

151157

152158

0 commit comments

Comments
 (0)