PDA

View Full Version : Show | Hide Sub-Forums


ramesh_umk3
09-04-2012, 03:59 PM
In my forum i have huge sub-forums list so planned to add collapse option to them and the problem is i have a code to do that but when i apply in forum it's not working properly.

<div style="margin: 5px; display: inline;" >
<input value="+ Show List" onclick="if(this.parentNode.parentNode.getElementsByTagName ('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = '- Hide List'; }
else
{ this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='+ Show List'; }" type="button">
</div>


<div class="alt2" style="border: 0px inset; padding: 0px;">
<div class="spoiler" style="display: none;">

CONTENT HERE

Alpine Audi (4/6) AlfaRomeo-Fiat-Lancia Becker BMW (2/2) Blaupunkt (1/1) Chrysler-Jeep Clarion Double-Din Ford (1/1) Honda Jaguar JVC Kenwood Kia Landrover Mazda Mercedes (10/15) Mitsubishi Navteq Opel Panasonic Peugeot-Citroen (5/16) Pioneer Porsche Renault-Nissan-Infinity Saab Sony Toyota-Lexus TeleAtlas Volvo Volkswagen-Seat-Skoda VDO Dayton (1/1) General Information Other US Cars Other Car Systems (1/5)


</div>
</div>

Can anyone help me to apply this code for my sub-forums so that my car navigation system (http://www.megawrz.com/other-gps-systems/) will be customized :)

https://vborg.vbsupport.ru/external/2012/09/49.png


Thank you All :up: