Back To Top
Visit Us At TwitterVisit Us At YouTubeVisit Us At Facebook
KandiChat is in Beta Release. Try It Out
  • UpdatesUpdates  
  • SearchSearch  
  • RegisterRegister  
  • Log inLog in  
  • April 2019

    Calendar Calendar


    Display results as :

    Rechercher Advanced Search


    Widget Toggler Empty
    Who is online?
    In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest


    Most users ever online was 22 on June 26th 2013, 6:10 am
    RSS feeds

    Top posting users this week

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


    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!

    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]
    $(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() {
      $('#left_widg button').html('Open');
    } else {
      $('#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() {
      $('#right_widg button').html('Open');
    } else {
     SetCookie('closeWidgetsRight', 'true', 0);
      $('#right').animate({width:'+='+ oriWidth +'px'},500,function() {
      $('#right_widg button').html('Close'); 
    if (ReadCookie('closeWidgetsLeft') == 'true') {
    } else if (ReadCookie('closeWidgetsRight') == 'true') {

    You will need the below cookie script as well

    [hc = Cookies Script]
    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));

    Share this post on: diggdeliciousredditstumbleuponslashdotyahoogooglelive

    is this for all widget toggle ? or individual ?

    Post on March 23rd 2013, 10:02 pm by tommycoo

    This is for the entire left side or right side widgets. 

    Post on March 24th 2013, 12:31 am by Mr.EasyBB

    can u make for individual widget ?

    Post on April 6th 2013, 9:40 pm by tommycoo

    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.

    Post on April 7th 2013, 9:09 pm by Mr.EasyBB

    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.

    Post on April 11th 2013, 1:50 am by Mr.EasyBB

    how is going easy ? did u can make for individual?

    Post on June 4th 2013, 2:11 am by tommycoo

    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

    Post on June 4th 2013, 5:00 pm by Mr.EasyBB

    Okay no problem easy Smile
    btw your kandi chat is cool, very well design and full color like facebook chat Very Happy

    good work

    Post on June 6th 2013, 4:15 am by tommycoo

    I'll be taking a look at this today or tomorrow ok man

    Post on June 7th 2013, 4:47 pm by Mr.EasyBB

    Post  by Sponsored content

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