Dinamically include jQuery

if(!(window.jQuery && window.jQuery.fn.jquery == '1.3.2'))
{
	var s = document.createElement('script');
	s.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');
	s.setAttribute('type', 'text/javascript');
	document.getElementsByTagName('head')[0].appendChild(s);
}

This entry was posted in javascript, javascript snippets and tagged . Bookmark the permalink.

Leave a Reply