How Can I Put This Image https://2img.net/i/fa/m/tabs_less1.gif On The Right Corner Of Mine Caggorie
Page 1 of 1 • Share
How Can I Put This Image https://2img.net/i/fa/m/tabs_less1.gif On The Right Corner Of Mine Caggorie
#615Ok my friend wants this on my site and i want to do it to how can i put this image https://2img.net/i/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
Forum Version: PunBB
Re: How Can I Put This Image https://2img.net/i/fa/m/tabs_less1.gif On The Right Corner Of Mine Caggorie
#618Add this to JS management and enable it for all pages...
then add this to css:
- 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://2img.net/i/fa/m/tabs_more1.gif);}
.contract {background: url(http://2img.net/i/fa/m/tabs_less1.gif);}
Re: How Can I Put This Image https://2img.net/i/fa/m/tabs_less1.gif On The Right Corner Of Mine Caggorie
#620- CodyMember
- Forum Posts : 43
Member Since : 2011-11-13
Marked Solved & Locked
Re: How Can I Put This Image https://2img.net/i/fa/m/tabs_less1.gif On The Right Corner Of Mine Caggorie
#0- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum