hhcj Posted January 23, 2013 Share Posted January 23, 2013 Hello, I want my page to display a header alternative when scrolling down. As in this page http://www.saveur-biere.com/fr/ I followed this tutorial http://return-true.com/2010/04/scroll-activated-slide-down-header-with-jquery/ But show me this error Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "******/header.tpl" on line 38 "bar.stop().animate({'top' : '0px'}, 500);" - Unexpected " : ", expected one of: "}" , " "' in ********/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:627 Can anyone help me with this error or tell me how I can make the modification to display a header alternative when scrolling down. Link to comment Share on other sites More sharing options...
NemoPS Posted January 26, 2013 Share Posted January 26, 2013 Hi there, You have to wrap you JS into a CDATA statement, otherwise it will conflict with smarty. Alternatively, wrap it inside a {literal}{/literal} Lastly, you can also place your JS code in a separate file and avoid the above;) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now