is this for all widget toggle ? or individual ?
March 2024
Search
Similar topics
Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest
None
Most users ever online was 140 on July 4th 2021, 2:03 pm
None
Most users ever online was 140 on July 4th 2021, 2:03 pm
Most Viewed Topics
Top posting users this week
No user |
Widget Toggler
Hey guys, so here is a code that works for every single version of forums. All you have to do is add it to the javascript management and mark it all pages. This code adds a button, you can change the button to something else which is on lines 2 & 3. Also the buttons are for both Left and Right but no worries guys If you don't have one or the other on the button will not be added! I will be working later to add a cookie to this so the user doesn't have to keep clicking the hide or show buttons.
One tip guys, go to your widgets management and find the pixel width of your widgets. Then add that to the var oriWidth. It will be crucial to your easy effect, this is on line 7. Nothing else very easy right!
UPDATE:
This code now offers COOKIE ENABLED. So everytime you go to a new page the widgets that are shown or hidden will be as same.
Ok here is the code:
[hc = Click To View Code]
You will need the below cookie script as well
[hc = Cookies Script]
One tip guys, go to your widgets management and find the pixel width of your widgets. Then add that to the var oriWidth. It will be crucial to your easy effect, this is on line 7. Nothing else very easy right!
UPDATE:
This code now offers COOKIE ENABLED. So everytime you go to a new page the widgets that are shown or hidden will be as same.
Ok here is the code:
[hc = Click To View Code]
- Code:
$(function() {
$('#left').before('<div id="left_widg"><button>Close</button></span>');
$('#right').before('<div id="right_widg"><button>Close</button></span>');
$('#left_widg button').on('click',function() {
var _checkme = $('#left').css('display');
var oriWidth = 180;
if(_checkme === "block") {
SetCookie('closeWidgetsLeft', 'true', 100);
$('#left').animate({width:'-='+ oriWidth +'px'},500,function() {
$(this).hide();
$('#left_widg button').html('Open');
});
} else {
$('#left').show();
$('#left').animate({width:'+='+ oriWidth +'px'},500,function() {
$('#left_widg button').html('Close');
SetCookie('closeWidgetsRight', 'true', 0);
});
}
});
$('#right_widg button').on('click',function() {
var _checkme = $('#right').css('display');
var oriWidth = 180;
if(_checkme === "block") {
SetCookie('closeWidgetsRight', 'true', 100);
$('#right').animate({width:'-='+ oriWidth +'px'},500,function() {
$(this).hide();
$('#right_widg button').html('Open');
});
} else {
$('#right').show();
SetCookie('closeWidgetsRight', 'true', 0);
$('#right').animate({width:'+='+ oriWidth +'px'},500,function() {
$('#right_widg button').html('Close');
});
}
});
if (ReadCookie('closeWidgetsLeft') == 'true') {
$('#left').css('display','none');
} else if (ReadCookie('closeWidgetsRight') == 'true') {
$('#right').css('display','none');
}
});
You will need the below cookie script as well
[hc = Cookies Script]
- Code:
function SetCookie(cookieName,cookieValue,nDays) {
var today = new Date();
var expire = new Date();
if (nDays==null || nDays==0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString();
}
function ReadCookie(cookieName) {
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName+"=");
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(";",ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
Similar topics
Yes I can. I will post a script and post the page url once I am finished. I will also be updating this script too.
I am working on an Individual widget toggler with features like, Minimize and Expand. Get rid of the widgets you don't use, as well as reset the widgets. This of course will be cookie enabled as well.
Oh yeah sorry Tommycoo, I was in development on this and while doing so I got into the KandiChat Dev and totally forgot about it. I will take a look at it again in a few ok
Okay no problem easy
btw your kandi chat is cool, very well design and full color like facebook chat
good work
btw your kandi chat is cool, very well design and full color like facebook chat
good work
|
|