![]() |
Adding Javascript to the frontpage
So I found this image slideshow and it works well with what my client wants.
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm I've got it running in a stand alone HTML file, but when I started adding it to the welcome.tpl things went wrong. The Category.tpl displays and so does my Facebook Like button, but the slide show is a no show :? Anyway here's the basis of the code in the HTML file. This portion is supposed to go above the </head> which I placed in my service_head.tpl file. Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> This is the portion of the HTML that displays the slideshow and the other things I want on the welcome page. Code:
<table width="600" border="0" cellspacing="0" cellpadding="1"> I know I should be using {literal} in a few places, I'm just not sure. And it's late, I'm tired :D Thanks, Mike |
Re: Adding Javascript to the frontpage
The googleapis should already be included in meta.tpl or meta_css.tpl. Including multiple jQuery versions will produce silent errors.
Fadeslideshow should be in root skin and referenced in meta.tpl or meta_js.tpl There </script> after the comments is unneeded, and so is the opening script afterwards. Move the opening script up to above the comments and throw literals in it. Code:
<script type="text/javascript"> |
Re: Adding Javascript to the frontpage
OK wait.
I put this in the skin1\customer\meta.tpl Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> Is there a way to turn "/demos/xcart/skin1" into {$SkinDir} that's in the javascript? Code:
{* |
Re: Adding Javascript to the frontpage
If /demos/xcart/skin1 is {$SkinDir} and you need to use that in the JS, you can do this:
Code:
<script type="text/javascript"> |
Re: Adding Javascript to the frontpage
Great thanks, working perfect!
|
All times are GMT -8. The time now is 08:52 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.