Web Widget Tutorial

Example 3 - Dynamically loading JavaScript files

In this example, Prototype and a different version of jQuery have already been loaded.

Version of jQuery which is already loaded: 1.3.2
Dynamically loading jQuery
jQuery script tag created
Before noConflict window.jQuery version is 1.4.2
After noConflict window.jQuery version is back 1.3.2
Retrieving content of h1 element using Prototype: Web Widget Tutorial
jQuery version 1.4.2 has been loaded.
Executing our main function.
Retrieving content of h1 element using jQuery: Web Widget Tutorial