Jump to content

showing Description in tabs


Recommended Posts

I have made a set of 3 tabs in Java but I cant show the product description in one of then I call the js with this line at the top of product.tpl


the code in this is as follows

var tabs = [
               //first tab
                   //tab image when unselected
                   //tab image when selected
                   //tab data
               //second tab
Delivery Inf'],
               //third tab
Returns Info']];
               //you can have more tabs if you want

//if you have empty space between your tabs, adjust this to a lower number
var width = 10;

function preloadImages() {
   for (var y = 0; y < 2; y++) {
       for (var x = 0; x < tabs.length; x++) {
           image = new Image();
           image.src = tabs[x][y];

function drawTabs() {
<table cellspacing="0" cellpadding="0" border="0">");
   [removed]("</table>");<br>   document.images["tab0"].src = tabs[0][1];<br>}<br><br>function switchTab(tab) {<br>   for (var x = 0; x < tabs.length; x++) {<br>       if (x != tab)<br>           document.images["tab"+x].src = tabs[x][0];<br>   }<br>   document.images["tab"+tab].src = tabs[tab][1];<br>   document.getElementById("currentTab")[removed] = tabs[tab][2];<br>}<br><br>preloadImages()

Any help you could give me would be great

Thanks in advance


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...