Hello!
I have a problem with my first FuelCMS Page. I want to use some jquery stuff on my new page. I have added the following lines in my header file:
{js('jquery')}
{js('fancybox/jquery.easing-1.3.pack')}
{js('fancybox/jquery.mousewheel-3.0.4.pack')}
{js('fancybox/jquery.fancybox-1.3.4')}
I verified that this links are working. But my jquery functions won't execute and I don't see why.
Can you please help me out?
Thanks in advance
Comments
Can you post your jQuery functions?
Try placing {literal}{/literal} around them. I've found that if the js has regex in there it still fails, best to put the code in /assets/js/main.js
It's an editable cms page.
I've tried the solution with the literal tags, but it doesn't work.
I want to implement the Fancybox jquery Plugin, which can be found here: http://fancybox.net/
Here is my jquery code (with the html part and the literal tags):
{literal}
$(document).ready(function() {
$("a#gallery").fancybox();
});
{/literal}
It finally works! I've putted my jquery code into the assets/js/main.js file and placed the following lines into my header:
{* Scripts *}
{js('jquery')}
{js('main')}
{js('fancybox/jquery.easing-1.3.pack')}
{js('fancybox/jquery.mousewheel-3.0.4.pack')}
{js('fancybox/jquery.fancybox-1.3.4')}
Now everything works as expected!
Thank you all very much for your help!