I must include jQuery in a page using code:
if (typeof window.jQuery === "undefined") {
document.write('<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"><\/script>');
if (typeof Prototype !== "undefined") {
document.write('<script>jQuery.noConflict();<\/script>');
}
}
But then if I try to use jQuery, Firebug logs "jQuery undefined".
jQuery(document).ready(function() {
//
});
but jquery is correctly loaded