[Solved] Javascript help please?!

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
JiiPee
Forum Members
Forum Members
Posts: 81
Joined: Fri Jan 23, 2009 7:03 pm

[Solved] Javascript help please?!

Post by JiiPee »

I am studying the basics of javascript and try to play around with cmsms and jcarousel (http://sorgalla.com/jcarousel/. I uploaded with ftp (also tried with file manager) the whole jcarousel folder in the root and then added to page options the Page Specific Metadata:











jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();
});




Then I added to Page Main Content with wysiwyg off:

jCarousel
Riding carousels with jQuery
Simple carousel
This is the most simple usage of the carousel with no configuration options.














I get to see the page but all the images are in the vertical row so it don't use any javascript to handle the images. Also I get this error: string(150) "Smarty error: [in metadata template line 25]: syntax error: unrecognized tag: jQuery('#mycarousel').jcarousel(); (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in metadata template line 25]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"

However, when I create via ftp new html document to the root with same content than above, everything works just fine. Is there some difference in jacascript paths with static html page vs creating page with cmsms that I am missing?
Last edited by JiiPee on Wed Apr 22, 2009 3:01 pm, edited 1 time in total.
JiiPee
Forum Members
Forum Members
Posts: 81
Joined: Fri Jan 23, 2009 7:03 pm

Re: Javascript help please?!

Post by JiiPee »

Finally after looong hours I got it working.

Just needed to place this part:


jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();
});

inside literals, like this:

{literal}



jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();
});

{/literal}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [Solved] Javascript help please?!

Post by Dr.CSS »

There you go, bob's your uncle... or is he mine? hmmm...
Post Reply

Return to “Layout and Design (CSS & HTML)”