View Single Post
  #4  
Old 02-17-2011, 09:10 AM
 
Shamun Shamun is offline
 

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

Default 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"> {literal} 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: [ {/literal} ["{$SkinDir}/fp_images/images/Apples.jpg", "", "", "Creative Additions to the Classic Candy Apple"], ["{$SkinDir}/fp_images/images/Chocolate_Covered_Potato_Chips.jpg", "", "", "Making Chocolate Covered Potato Chips"], ["{$SkinDir}/fp_images/images/Party_Room.jpg", "", "", "Celebrate Your Birthday or Special Occasion With The Peanut Man"], ["{$SkinDir}/fp_images/images/Strawberries.jpg", "", "", "Beautiful Fresh Strawberries Dipped in Chocolates"], ["{$SkinDir}/fp_images/images/Popcorn.jpg", "", "", "Stop By for Freshly Popped Popcorn Everyday"], ["{$SkinDir}/fp_images/images/Gift_Backets.jpg", "", "", "Custom Made Gift Baskets For Your Friends or Your Employees"], ["{$SkinDir}/fp_images/images/Chocolate_Covered_Pecan_Clusters.jpg", "", "", "Order Your Pecans Any Way You Like Them"], ["{$SkinDir}/fp_images/images/Peanut_Girl.jpg", "", "", "Children Enjoy Picking Through Our Traditional and Custom Candies"] //<--no trailing comma after very last image element! ], {literal} 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