Chatbox

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

Ok my friend wants this on my site and i want to do it to how can i put this image http://illiweb.com/fa/m/tabs_less1.gif on the right corner on the Categories cause when i do it i get confused can someone help me.

Forum Version: PunBB

View user profile http://www.badhaxer.com

Drogba921

avatar

Administrator
Add this to JS management and enable it for all pages...

Code:
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('.main-head .page-title').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 = documentcookie.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);}
            }
        }
    }
});

then add this to css:

Code:
.expand, .contract {position: absolute; top: 6px; right: 10px; cursor: pointer; width: 9px; height: 9px; background: url(http://illiweb.com/fa/m/tabs_more1.gif);}
.contract {background: url(http://illiweb.com/fa/m/tabs_less1.gif);}

View user profile http://www.codinghelp.org
Thanks Bro

View user profile http://www.badhaxer.com

Cody

avatar

Member
Marked Solved & Locked

View user profile

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum