Hello,

I am trying to load jQuery from Javascript like the following code.


== code ==
if (typeof jQuery == 'undefined' || !jQuery) {
        var s = document.createElement('script');
        s.setAttribute('type','text/javascript');
        s.setAttribute('src','http://localhost/jquery-latest.min.js');
        document.getElementsByTagName('head')[0].appendChild(s);
}
== end of code ==

However, then this code is included, "jquery-latest.min.js" is
included, but the page shows javascript error, "$ is not defined."

Any tips to solve this problem??

Thanks bunch in advance!

Reply via email to