jQuery and
Permalink
Hi everyone,
I'm pretty new to Concrete and I'm trying to create a menu for my website, I'm using jQuery and Background Animated Position.
The thing is that the scripts I currently have doesn't work at all when I use this line on the code:
<?php Loader::element('header_required'); ?>
-- Plugin for background animated position--
<script src="<?=$this->getThemePath()?>/javascripts/animate-bg.js" type="text/javascript"></script>
-- Own script for effects --
<script src="<?=$this->getThemePath()?>/javascripts/scripts.js" type="text/javascript"></script>
However, If I remove the <?php loader?> and I try to load the jQuery from googleappis it will work everything as expected.
Any suggestion what can I do here?
I'm pretty new to Concrete and I'm trying to create a menu for my website, I'm using jQuery and Background Animated Position.
The thing is that the scripts I currently have doesn't work at all when I use this line on the code:
<?php Loader::element('header_required'); ?>
-- Plugin for background animated position--
<script src="<?=$this->getThemePath()?>/javascripts/animate-bg.js" type="text/javascript"></script>
-- Own script for effects --
<script src="<?=$this->getThemePath()?>/javascripts/scripts.js" type="text/javascript"></script>
However, If I remove the <?php loader?> and I try to load the jQuery from googleappis it will work everything as expected.
Any suggestion what can I do here?
Hey growthculture,
Thank for your answer, I'm not calling the jQuery from any other file or script. The scripts.js is just a script to add some effects to the menu but I just gave it that name as I'm just testing it. I just wonder if changing the version of the jQuery in concrete5 from 1.7.1 to 1.4.1 is possible because that is the way it is working...or that might bring issues at the time of running the site?
Thank for your answer, I'm not calling the jQuery from any other file or script. The scripts.js is just a script to add some effects to the menu but I just gave it that name as I'm just testing it. I just wonder if changing the version of the jQuery in concrete5 from 1.7.1 to 1.4.1 is possible because that is the way it is working...or that might bring issues at the time of running the site?
I suspect it is a load order and ready issue. Do you get errors in the developer console?
You may find it more reliable to structure your own script as a function within the script file, then to call that function from within a snippet of script within script tags and a jQuery ready handler of your theme php.
You may find it more reliable to structure your own script as a function within the script file, then to call that function from within a snippet of script within script tags and a jQuery ready handler of your theme php.
Ok, I just realized that the version of jQuery I currently have in my concrete5 is jQuery 1.6.2 , when I edit the jquery.js and I add the 1.4.1 version it will work.
Can we change the jQuery version for our sites? I'm wondering because I have done that on my computer, but not show if that might have problems at the time of the setup the website.
Can we change the jQuery version for our sites? I'm wondering because I have done that on my computer, but not show if that might have problems at the time of the setup the website.
You do NOT need to include calling in your own script. The only thing you need is the animate-bg.js script.
Try only doing that. Trying to call in script.js will cause conflicts with Concrete, and things won't work.