Cant get toggle to work
4 posters
Page 1 of 1
Cant get toggle to work
Hi all
i have been trying to get this to work but can't
https://help.forumotion.com/t96460-category-toggle-script
i have done as it said and still cant get it to work
can some one help me please
My code i have is
Ape
i have been trying to get this to work but can't
https://help.forumotion.com/t96460-category-toggle-script
i have done as it said and still cant get it to work
can some one help me please
My code i have is
- Code:
<script type="text/javascript">
function toggleLTcategory(cat) {
var cid=cat.id;
var button=document.getElementById('b'+cid);
if (cat.style.display=='none') {
cat.style.display='block';
button.className='contract';
my_setcookie('_' + cid, '', true);
}
else {
cat.style.display='none';
button.className='expand';
my_setcookie('_' + cid, '1', true);
}
}
jQuery(function () {
x=jQuery('.topiclist .header').get();
for (i=0; i<x.length; i++) {
x[i].style.position='relative';
var cid='c'+String(i+1);
x[i].parentNode.nextSibling.setAttribute('id',cid);
x[i].parentNode.nextSibling.style.display='block';
var y='<div id="b'+cid+'" class="contract" onclick="toggleLTcategory(this.parentNode.parentNode.nextSibling);"></div>';
x[i].innerHTML=x[i].innerHTML+y;
}
cookies = document (.) cookie.split('; ');
for (i in cookies) {
if (cookies[i].charAt(0) == '_') {
cookie = cookies[i].split('=');
if (cookie[1] == '1') {
cid = cookie[0].substring(1);
if (document.getElementById(cid)) {toggleLTcategory(cid);}
}
}
}
});
</script>
Ape
Last edited by ape man on October 26th 2011, 4:42 pm; edited 1 time in total
Re: Cant get toggle to work
Hi!
Have you followed the other steps correctly? Please also note that this tutorial does not support forums running on version phpBB 2.
Have you followed the other steps correctly? Please also note that this tutorial does not support forums running on version phpBB 2.
Re: Cant get toggle to work
Add in the description of the last forum Exemple: Trash / Garbage
Guest- Guest
Re: Cant get toggle to work
ok i have worked it out i have played about with some things and got it working thank you guys
Nera.- Energetic
- Posts : 7078
Reputation : 2017
Language : English
Location : -
Similar topics
» Profile toggle
» Toggle Widgets + Toggle Categories
» Toggle issues
» category-toggle
» Category toggle
» Toggle Widgets + Toggle Categories
» Toggle issues
» category-toggle
» Category toggle
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum