getting error with jquery? - SOLVED

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
darksaga
Forum Members
Forum Members
Posts: 10
Joined: Sat Nov 07, 2009 8:42 pm

getting error with jquery? - SOLVED

Post by darksaga »

Hey guys,

I'm building a site using the foundation responsive design framework and they have a slick little jquery slide show they use. I've uploaded and linked all the JS files correctly, but I'm getting an error when it's trying to load the slideshow with the function:

Code: Select all

<__script__ type="text/javascript">
     $(window).load(function() {
         $('.slide-show').orbit();
     });
</__script>
And I'm getting this error:

Code: Select all

string(135) "Smarty error: [in tpl_body:23 line 97]: syntax error: unrecognized tag: $('.slide-show').orbit(); (Smarty_Compiler.class.php, line 446)" string(111) "Smarty error: [in tpl_body:23 line 97]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
I'm wondering why I'm getting this error. Any help would be greatly appreciated.

thanks,

D
Last edited by darksaga on Sat Feb 25, 2012 8:32 pm, edited 1 time in total.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: getting error with jquery?

Post by Wishbone »

JavaScript uses curly brackets. So does Smarty. Smarty wins, and declares a syntax error. Wrap your JavaScript with {literal} {/literal} tags.
darksaga
Forum Members
Forum Members
Posts: 10
Joined: Sat Nov 07, 2009 8:42 pm

Re: getting error with jquery?

Post by darksaga »

Brilliant! Thanks for the tip, I'll keep this mind for next time.

D
Post Reply

Return to “CMSMS Core”