Mark Agency Posted May 9, 2014 Share Posted May 9, 2014 (edited) H, actually I'm trying to insert jquery code in header.tlp but when I put it into head tags and reload I got a blank page, please help me, above the code. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"> </script> <script> $(document).ready(function(){ $("shopping_cart").hover(function(){ $("cart_block").animate({top:'50px'}); $("cart_block").show(); }, function() { $("cart_block").animate({bottom:'50px'}); $("cart_block").hide(); $("cart_block").hover(function(){ $("cart_block").show(); }, function() { $("cart_block").hide(); }); }); }); </script> Edited May 11, 2014 by vekia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 9, 2014 Share Posted May 9, 2014 your script uses brackets, you have to use {literal}{/literal} tags, because of brackets compiler thinks that this is smarty syntax - in fact, it isn't. {literal} SCRIPT HERE {/literal} Link to comment Share on other sites More sharing options...
Mark Agency Posted May 11, 2014 Author Share Posted May 11, 2014 your script uses brackets, you have to use {literal}{/literal} tags, because of brackets compiler thinks that this is smarty syntax - in fact, it isn't. {literal} SCRIPT HERE {/literal} Thanks for you answer. I've done like this and did not work, instead y used like I posted and check console errors, put the .js files on the correct folder and it worked. Thanks Link to comment Share on other sites More sharing options...
vekia Posted May 11, 2014 Share Posted May 11, 2014 put the .js files on the correct what files? your code doesnt contain any file (except the only one that is included from external website) Link to comment Share on other sites More sharing options...
Mark Agency Posted May 11, 2014 Author Share Posted May 11, 2014 what files? your code doesnt contain any file (except the only one that is included from external website) I've downloaded the js file and uploaded to my server and then I include the local copy into header and it works. Link to comment Share on other sites More sharing options...
vekia Posted May 11, 2014 Share Posted May 11, 2014 ok now it's clear thank you for clarification :-) topic marked as solved with regards, Milos Link to comment Share on other sites More sharing options...
Mark Agency Posted May 12, 2014 Author Share Posted May 12, 2014 Thank you for your time, appreciate it. Regards. 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