Change the jQuery version for MobileFirst applications
When we develop an application in MobileFirst Studio, the bundled version of jQuery might not be sufficient for development needs. This procedure provides instructions about how to use a different version of jQuery.
jQuery is bundled as a library within IBM MobileFirst Platform Foundation. By default, every new application includes a main HTML file, which contains the following code that is required to use the embedded jQuery:
<script>window.$ = window.jQuery = WLJQ;</script>
To use a different version of the jQuery library, complete the following steps:
- Remove the <script>window.$ = window.jQuery = WLJQ;</script> code from the main HTML file of your application.
- Add jQuery files to the project.
- Add the <script> tag that refers to the files that we added in step 2.
Results
The updated version of jQuery will be used for all environments.
Parent topic: Use JavaScript toolkits for the user interface