Translate

Saturday, 28 September 2013

Tab Concept using Ajax

Screenshot:
                             

index.php:

<body>
<ul id="countrytabs" class="shadetabs">
<li><a href="home1.htm" rel="countrycontainer" class="selected">Tab 1</a></li>
<li><a href="home2.htm" rel="countrycontainer" id="favorite">Tab 2</a></li>
<li><a href="home3.htm" rel="countrycontainer">Tab 3</a></li>
<li><a href="home4.htm" rel="countrycontainer">Tab 4</a></li>
</ul>

<div id="countrydivcontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px; background-color:#000; color:#FFF;">
</div>
<script type="text/javascript">

var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()

</script>
</body>
Downloads:script.js,style.css

No comments:

Post a Comment