View Single Post
  #2  
Old 02-15-2011, 09:24 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default 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"> {literal} /*********************************************** * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more ***********************************************/ var mygallery1=new fadeSlideShow({ wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow dimensions: [480, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image imagearray: [ ["images/Apples.jpg", "", "", "Creative Additions to the Classic Candy Apple"], ["images/Chocolate_Covered_Potato_Chips.jpg", "", "", "Making Chocolate Covered Potato Chips"], ["images/Party_Room.jpg", "", "", "Celebrate Your Birthday or Special Occasion With The Peanut Man"], ["images/Strawberries.jpg", "", "", "Beautiful Fresh Strawberries Dipped in Chocolates"], ["images/Popcorn.jpg", "", "", "Stop By for Freshly Popped Popcorn Everyday"], ["images/Gift_Backets.jpg", "", "", "Custom Made Gift Baskets For Your Friends or Your Employees"], ["images/Chocolate_Covered_Pecan_Clusters.jpg", "", "", "Order Your Pecans Any Way You Like Them"], ["images/Peanut_Girl.jpg", "", "", "Children Enjoy Picking Through Our Traditional and Custom Candies"] //<--no trailing comma after very last image element! ], displaymode: {type:'auto', pause:3800, cycles:0, wraparound:false, randomize:true}, persist: true, //remember last viewed slide and recall within same session? fadeduration: 500, //transition duration (milliseconds) descreveal: "always", togglerid: "" }) {/literal} </script>
__________________
- Shane Munroe
Reply With Quote