Sahil Sharma
Sahil Sharma

Reputation: 1

change tabs on hitting next button

i need to shift tabs on clicking the NEXT green button at the end of each tab. here it is http://www.cmsonlinehelp.com/ann/events

currently whats happening is that i am able to move to tabs by clicking on them. but i need to move to next tabs on clicking the NEXT button.

Here is my script code :

 <script type="text/javascript">
var countries=new ddtabcontent("countrytabs")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>

I am using this in my navigation:

        <ul id="countrytabs" class="shadetabs">            
        <li><a href="#" rel="country1" class="selected">Photography Coverage</a></li>
        <li><a href="#" rel="country2" id="videocoverage">Video Coverage</a></li>
        <li><a href="#" rel="country3" id="djcoverage">Dj Coverage</a></li>
        <li><a href="#" rel="country4" id="eventcoverage">Event Details</a></li>
        </ul>

Giving id's to the single tabs div like:

          <div id="country1" class="tabcontent">
          <div id="country2" class="tabcontent">
          <div id="country3" class="tabcontent">
          <div id="country4" class="tabcontent">

Upvotes: 0

Views: 535

Answers (1)

Richard Rout
Richard Rout

Reputation: 1316

Just call the click event of the tab link. So for the first "Next" button your javascript would call document.getElementById('videocoverage').click()

Upvotes: 1

Related Questions