Jump to content

Greensock Javascript Code - Problem


ZAJDAN

Recommended Posts

Hello,

I am facing now similar problem...

when I try to use greensock javascript code inside header.tpl:

var logo = $("#landing-logo");
var time = 3.5;
TweenMax.from(logo,2, {css:{top: "0px", scaleX:.2, scaleY:.2},ease:Strong.easeInOut});

so the web is not loaded and get:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

 

It is not a problem with the greensock library and my own gs code, because out of the presta web it runs fine

it seems, that some php fight with execute the code

 

I also have tried delete the js code from header.tpl and run the web...as the web was correctly loaded I run the js code via console and in this moment it works fine

 

Thank You for any help

 

Regards Zdenek 

Link to comment
Share on other sites

I have enabled dev mode and I have new info:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/mnt/databox/www/www.shop.com/themes/default-bootstrap/header.tpl" on line 85 "TweenMax.from(logo,2, {css:{top: "0px", scaleX:.2, scaleY:.2},ease:Strong.easeInOut});" - Unexpected ":", expected one of: "}" <-- thrown in /mnt/databox/www/www.shop.com/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 85

Link to comment
Share on other sites

Thank You for the hint

all other what I have wrapped in <script> </script> inside header.tpl works without problem

but the code which call greensock library not

 

 

now I am trying put the code into {literal} {/literal} as You wrote me

in this case the page is loaded completely, but the js effect is not executed

even any other script which before worked corectly doesn't work now when is wrapped into literal

Edited by ZAJDAN (see edit history)
Link to comment
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...