Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : initial load collapsed



Threaded Mode | Print  

 initial load collapsed, how can I do this? (2 Replies, Read 3305 times)
columbusgeek
Group: Member
Post Group: Newbie
Posts: 6
Status:
How can I get the left hand menu system to be collapsed by default or on first load? Right now it starts off totally open, until the user changes it in his/her settings.

Board Image
IP: --   

initial load collapsed
alons
Group: Administrator
Post Group: Super Member
Posts: 2280
Status:
Hi,

Its controlled by slider.js in themes/yourtheme/js/slider.js

Regards,
Alons

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP
IP: --   

initial load collapsed
columbusgeek
Group: Member
Post Group: Newbie
Posts: 6
Status:
My javascript skills are rather poor.  can you please explain what might need changed in this file?

Code

//////////////////////////////////////////////////////////////
// js_slider
// By Alons
// Please Read the Terms of use at http://www.softaculous.com
// (c)Softaculous Inc.
//////////////////////////////////////////////////////////////

function slideitout(elid, endheight, inc, time){
    startheight = $(elid).offsetHeight + inc;
    if(startheight < endheight){
        diff = endheight - startheight;
        if(diff > inc){
            $(elid).style.height = startheight+"px";
            setTimeout('slideitout(\''+elid+'\', '+endheight+', '+inc+', '+time+');', time);
        }else{
            $(elid).style.height = endheight+"px";
        }
    }
};

function pullitin(elid, dec, time){
    height = $(elid).offsetHeight - dec;
    if(height > dec){
        $(elid).style.height = height+"px";
        setTimeout('pullitin(\''+elid+'\', '+dec+', '+time+');', time);
    }else{
        $(elid).style.height = "1px";//A bug in IE 5.5
    }
};

function slider(){
    this.speed = 20;
    this.img_collapsed = imgurl+'collapsed.gif';
    this.img_expanded = imgurl+'expanded.gif';
    this.elements = new Array();
   
    this.slide = function(id){
        var height = $(id).offsetHeight;
        if(height > 1){
            this.collapse(id);
        }else{
            this.expand(id);
        }
    };
   
    this.expand = function(id){
        slideitout(id, $('t'+id).offsetHeight, this.speed, 1);
        $('i'+id).src = this.img_expanded;
        removecookie(id);
    };
   
    this.collapse = function(id){
        pullitin(id, this.speed, 1);
        $('i'+id).src = this.img_collapsed;
        setcookie(id, '1', 365);
    };
   
    //Init it
    this.init = function(){   
        var elements = this.elements;
        for(id in elements){
            if(getcookie(elements[id]) == 1){
                $(elements[id]).style.height = "1px";
                $('i'+elements[id]).src = this.img_collapsed;
            }
        }
    };
   
    this.expandAll = function(){
        var elements = this.elements;
        for(key in elements){
            id = elements[key];
            this.expand(id);
        }
    };
   
    this.collapseAll = function(){
        var elements = this.elements;
        for(key in elements){
            id = elements[key];
            this.collapse(id);
        }
    };
};

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 25, 2024, 3:29 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.029