On a fairly new drupal (7.23) site I tried including the jquery-2.0.3.js file with the drupal_add_js function in one of my modules hook_init function. All was working good and well when I was testing the login screen but then I went to some others pages, I got this error in firebug console:
TypeError: $(...).add(...).filter(...).once is not a function
http://XXX/sites/all/libraries/jquery/jquery-2.0.3.js?mw5wsb
Line 1670
(where XXX is my sitename)
So I noticed on one of my other sites the same library loaded fine when it was included in the theme.info file. So I tried it that way and sure enough jquery-2.0.3 loads fine when I do it that way. (ie.
scripts[] = js/vendor/jquery-2.0.3.js
Does anyone know why a jquery include would not work with drupal_add_js and why it would work with the theme.info file?
Many thanks.
d