zawijanie kategorii

Założony przez  Patryk1011.

wersja skryptu MyBB: 1.6.9
adres forum: localhost
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu): mam niewielki problem z zwijaniem kategorii, mianowicie nieważne którą kategorię zwijam, to tylko i wyłącznie pierwsza się zwija a ta co to ją chciałem zwinąć, to zostaje rozwinięta :(
poniżej zamieszczem kod z: forumbit_depth1_cat

<div id="cat_{$forum['fid']}" class="content">
<div class="thead_2" id="th1" >
<span class="forumtitle"><a href="{$forum_url}">{$forum['name']}</a></span><span class="forumdesc">{$forum['description']}</span>
<span class="expcolimage expcol_close"><img src="images/specjal/collapse.gif" /></span>
<span class="expcolimage expcol_open"><img src="images/specjal/collapse_collapsed.gif" /></span>
</div>
<div id="expcol_box1">
<table border="0" cellspacing="0" cellpadding="4" class="tborder tborder_2">
<tbody style="{$expdisplay}">
{$sub_forums}
</tbody>
</table>
</div>
<br />
</div>


proszę o szybką pomoc, nie dałem żadnego screena ponieważ styl tworzę na zlecenie i zleceniodawca zabronił komukolwiek pokazywać wczesnej wersji stylu :)
Spróbuj tak:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="5">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>Wątki/Posty</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />
ahh ja głupi, zapomniałem że użyłem też js-a, który powoduje animację a do tego lekkie zanikanie cellpika, co do belki to na innym stylu(bez js) mi działa, więc raczej wina js-a, poniżej kod js-a

var expopen = '.expcol_open';
var expclose = '.expcol_close';
var thead2 = '.thead_2'
jQuery(expclose).on("click", function() {
var thead = jQuery(this).parent(thead2);
var thead_id = jQuery(this).parent(thead2).attr("id");
var n = parseInt(thead_id.replace('th',''), 10);
jQuery("#expcol_box" + n).slideUp('3000','easeOutQuint');
jQuery(this).hide();
thead.children(expopen).show();
thead.animate({"border-radius":"5px","opacity":"0.4"});
jQuery.cookie( n, "closed", {expires: 365});
return false;
    });

jQuery(expopen).on("click", function() {
var thead = jQuery(this).parent(thead2);
var thead_id = jQuery(this).parent(thead2).attr("id");
var n = parseInt(thead_id.replace('th',''), 10);
jQuery("#expcol_box" + n).slideDown('3000','easeOutQuint');
jQuery(this).hide();
thead.children(expclose).show();
thead.animate({"border-radius":"5px","opacity":"1"});
jQuery.cookie( n, "open", {expires: 365});
return false;
    });



Użytkownicy przeglądający ten wątek:

1 gości