hi all,
i am using elgg 2.2.3. and would like to load query.js and query-ui.js in the head Area.
The views.php in vendor/elgg/elgg/engine/lib/ contains the following lines:
elgg_register_js('jquery', elgg_get_simplecache_url('jquery.js'), 'head'); elgg_load_js('jquery'); elgg_register_js('jquery-ui', elgg_get_simplecache_url('jquery-ui.js'), 'head'); elgg_load_js('jquery-ui');
Due to the simple word "head" elgg should place it in the html-head-area. But instead its in the body area before the end body Tag. Is this an elgg Error or am i doing something wrong?
Thanks in advance.
tobobu
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Dries@driesdk
Dries - 0 likes
You must log in to post replies.jQuery and jqueryUI are both already registered for you in Elgg as AMD modules, and can be used.
It's also a bad practice to load jQuery in the head of your page.
check http://learn.elgg.org/en/stable/guides/javascript.html