PDA

View Full Version : Selected status on Ajax Tabs being set for all



butair
09-28-2011, 03:28 PM
1) Script Title: Ajax Tabs Content Script (v 2.2)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem:

I have the tabs working great, however the selected class is being set for all the tab a links. I cannot figure this out.

My code is:


<ul id="flypage_tabs" class="shadetabs">
<li><a href="#" rel="#default" rev="product_details">Product Description</a></li>
<li><a href="#" rel="#productreviews" rev="productreviews">Reviews</a></li>
<li><a href="#" rel="#productfiles" rev="productfiles">Product Files</a></li>
<li><a href="#" rel="#similarproducts" rev="similarproducts">Similar Products</a></li>
</ul>

<div id="product_details" style="border:1px solid #e5e5e5; width:512px; margin-bottom: 1em; padding: 10px">
<?php echo $product_type ?><br />
<?php echo $product_description ?>
</div>

<div id="productreviews" style="border:1px solid #e5e5e5; width:512px; margin-bottom: 1em; padding: 10px">
<?php echo $product_reviews ?>
<br />
<?php echo $product_reviewform ?>
</div>

<div id="productfiles" style="border:1px solid #e5e5e5; width:512px; margin-bottom: 1em; padding: 10px">
<?php echo $file_list ?>
</div>

<div id="similarproducts" style="border:1px solid #e5e5e5; width:512px; margin-bottom: 1em; padding: 10px">
<?php echo $related_products ?>
</div>

<script type="text/javascript">

var product_tabs=new ddajaxtabs("flypage_tabs", "product_details", "productreviews", "productfiles")
product_tabs.setpersist(false)
product_tabs.setselectedClassTarget("link") //"link" or "linkparent"
product_tabs.init()

</script>

Any ideas would be most helpfull.