1. Meroveus
  2. General Talk
  3. Friday, 22 July 2011
  4.  Subscribe via email
Hi! I've used !SlickMenu by Compojoom on my non-commerce site, but this script has very low speed in Opera and Firefox browser. Especially it gives trouble Opera netbook users, the ones who work on slow computers. But in IE8/9 this script hasn't have any problem on netbooks.

Do you have any idea?



/*
* Copyright(C) Compojoom.com. All rights reserved.
* License http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* !SlickMenu is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* !SlickMenu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*

* Based on Michael Leigeber's TinyAccordion script
* http://www.leigeber.com/2009/03/accordion/
*
* Fixed for !SlickMenu by Radoslav Salov
* rado.salov[at]gmail.com
*/

var SlickMenu={};

SlickMenu.accordion=function(){
function slider(n){this.n=n; this.a=[];}
slider.prototype.init=function(t,e,sec,m,o,k){
var a=$(t), i=s=0, n=a.childNodes, l=n.length; this.s=k||0; this.m=m||0;
for(i;i=c.m)||(c.d!=1&&h==1)){if(c.d==1){c.style.height='auto'} else {c.style.visibility='hidden';} clearInterval(c.t);}
};
return{slider:slider};
}();

SlickMenu.dropdown=function(){
var z=50,s=6,a;
function dd(n){this.n=n; this.h=[]; this.c=[];};
dd.prototype.init=function(p,c) {
a=c;
var w=document.getElementById(p), s=w.getElementsByTagName('ul'), l=s.length, i=0;
for(i;i;
clearInterval(c.t);
c.style.overflow='hidden';

if(f){
$(p).addClass(a);
c.style.display='block';

if(!c.mh){
c.mh=c.offsetHeight;
if (SLICKMENU_DROP_ALLOW_HEIGHT){
c.style.height=0;
}
}
if(!c.mw){
c.mw=c.offsetWidth;
if (SLICKMENU_DROP_ALLOW_WIDTH){
c.style.width=0;
}
}
if(c.mh==c.offsetHeight && c.mw==c.offsetWidth){
c.style.overflow='visible';
} else {
c.style.zIndex=z; z++;
c.t=setInterval(function(){sl(c,1);},SLICKMENU_DROP_ANIM_SPEED);
}
} else {
$(p).removeClass(a);
c.t=setInterval(function(){sl(c,-1);},SLICKMENU_DROP_ANIM_SPEED);
}
};
function sl(c,f){
var h=c.offsetHeight, w=c.offsetWidth, tostop = false;
var pt = $(c).getStyle('paddingTop').toInt();
var pb = $(c).getStyle('paddingBottom').toInt();
if (pt || pb) h = h + ((pt + pb) * f);
var pl = $(c).getStyle('paddingLeft').toInt();
var pr = $(c).getStyle('paddingRight').toInt();
if (pl || pr) w = w + ((pl + pr) * f);

if (SLICKMENU_DROP_ALLOW_HEIGHT && SLICKMENU_DROP_ALLOW_WIDTH) {
tostop=(((h=c.mh&&f==1))&&((w=c.mw&&f==1)));
} else if (SLICKMENU_DROP_ALLOW_HEIGHT) {
tostop=((h=c.mh&&f==1));
} else if (SLICKMENU_DROP_ALLOW_WIDTH) {
tostop=((w=c.mw&&f==1));
}
if (tostop){
if(f==1){
if (SLICKMENU_DROP_ALLOW_OPACITY) {
c.style.filter='';
c.style.opacity=1;
}
c.style.overflow='visible';
} else {
c.style.display='none';
}
clearInterval(c.t);
return;
}

var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s);
var dw=(f==1)?Math.ceil((c.mw-w)/s):Math.ceil(w/s);
var o = 1;
if (SLICKMENU_DROP_ALLOW_HEIGHT) {
o=h/c.mh;
} else if (SLICKMENU_DROP_ALLOW_WIDTH) {
o=w/c.mw;
}
if (SLICKMENU_DROP_ALLOW_OPACITY) {
c.style.opacity=o;
c.style.filter='alpha(opacity='+(o*100)+')';
}
if (SLICKMENU_DROP_ALLOW_HEIGHT){
if ((h=c.mh&&f==1)) {
c.style.height=c.mh+'px';
} else {
c.style.height=h+(d*f)+'px';
}
}
if (SLICKMENU_DROP_ALLOW_WIDTH){
if ((w=c.mw&&f==1)) {
c.style.height=c.mh+'px';
} else {
c.style.width=w+(dw*f)+'px';
}
}
if(!(SLICKMENU_DROP_ALLOW_HEIGHT || SLICKMENU_DROP_ALLOW_WIDTH)) {
c.style.display='none';
}
};
return{dd:dd};
}();

Responses (1)


There are %s replies to this question. If you want to see them you need a valid subscription.
If you have a valid subscription, please login now.
Visit store now

Last questions

Hotspots Pro 6.0.13 compatability with Joomla 5.3.
Running Hotspots Pro 6.0.13 on Joomla 4.4.13 and want to upgrade to Joomla 5.3.1...
2 Replies
Posted on Friday, 04 July 2025
  • New
  • some questions on Hotspots
    Hi, On Hotspots extension : 1) is it possible to add our own map layer / v...
    0 Replies
    Posted on Thursday, 03 July 2025
  • New
  • Trying to resize the image in the comments
    Hey everyone, Basically I am trying to make the images in the comments smalle...
    9 Replies
    Posted on Wednesday, 12 August 2009
    J5 compatibility for Hotspots
    Hi guys, Just started to update my old J3x website. Is there J5 compatibility p...
    2 Replies
    Posted on Monday, 24 February 2025
    • #Hotspots
    • #hotspots Joomla 5
    error message when adding/cofiguring email address
    When configuring the email plugin that send a email message to admin when a new ...
    0 Replies
    Posted on Friday, 09 May 2025