Looking at your page, there are a number of issues that need to be dealt with. Firstly, you effectively have 5 instances of horizontal accordions on your page, though you've given all of them the same ID attribute ("hc1"):
Code:
<div id="hc1" class="haccordion">
<ul>
<li>
<a href="javascript:one()"><div class="hpanel">
<img src="images/portfolio_images/thumbnails/one.png" style="float:left; padding-right:8px;" /><p>The Andaman Sea is regarded as Thailand's most precious natural resource as it hosts the most popular and luxurious resorts in Asia.</p>
</div></a>
</li>
<li>
<a href="javascript:two()"><div class="hpanel">
<img src="images/portfolio_images/thumbnails/two.png" style="float:left; padding-right:8px;" /><p>The Andaman Sea is regarded as Thailand's most precious natural resource as it hosts the most popular and luxurious resorts in Asia.</p>
</div></a>
</li>
<li>
<a href="javascript:three()"><div class="hpanel">
<img src="images/portfolio_images/thumbnails/three.png" style="float:left; padding-right:8px;" /><p>The Andaman Sea is regarded as Thailand's most precious natural resource as it hosts the most popular and luxurious resorts in Asia.</p>
</div></a>
</li>
<li>
<a href="javascript:four()"><div class="hpanel">
<img src="images/portfolio_images/thumbnails/four.png" style="float:left; padding-right:8px;" /><p>The Andaman Sea is regarded as Thailand's most precious natural resource as it hosts the most popular and luxurious resorts in Asia.</p>
</div></a>
</li>
</ul>
</div>
This is incorrect- each horizontal accordion should carry an unique ID attribute, so ("hc1" for the first one, "hc2" for the 2nd, "hc3" for the 3rd etc). With that corrected, you also need to spawn a new instance of an accordion (by calling haccordion.setup()) for each accordion on your page, instead of what you have right now:
Code:
haccordion.setup({
accordionid: 'hc1', //main accordion div id
scrollerid: '2000',
scrollerid: '3000',
scrollerid: '4000',
scrollerid: '5000',
scrollerid: '6000',
paneldimensions: {peekw:'100px', fullw:'320px', h:'115px'},
selectedli: [0, true], //[selectedli_index, persiststate_bool]
collapsecurrent: false //<- No comma following very last setting!
})
</script>
The above should be changed to something like:
Code:
haccordion.setup({
accordionid: 'hc1', //main accordion div id
scrollerid: '2000',
paneldimensions: {peekw:'100px', fullw:'320px', h:'115px'},
selectedli: [0, true], //[selectedli_index, persiststate_bool]
collapsecurrent: false //<- No comma following very last setting!
})
haccordion.setup({
accordionid: 'hc2', //main accordion div id
scrollerid: '3000',
paneldimensions: {peekw:'100px', fullw:'320px', h:'115px'},
selectedli: [0, true], //[selectedli_index, persiststate_bool]
collapsecurrent: false //<- No comma following very last setting!
})
haccordion.setup({
accordionid: 'hc3', //main accordion div id
scrollerid: '4000',
paneldimensions: {peekw:'100px', fullw:'320px', h:'115px'},
selectedli: [0, true], //[selectedli_index, persiststate_bool]
collapsecurrent: false //<- No comma following very last setting!
})
//etc
With the above changes it should fix the issue with only the last accordion working, though I'm not sure if there remains other issues as far as conflicts with your scroller script that may derail everything. Worth a shot though.
Bookmarks