Jump to content

Scroll Activated Slide Down Header


Recommended Posts

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.

Share this post


Link to post
Share on other sites

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;)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More