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

Veranstaltung im Frontend sichtbar obwohl nicht ve
Hallo, folgendes Problem stellt sich mir: Wenn ich eine Veranstaltung dupl...
3 Replies
Posted on Friday, 09 February 2024
Suche bei der Matukio - Fehler Ö Ä Ü..
Hallo, evtl. könnt ihr mir weiterhelfen. Bei mir funktioniert die suche bei ...
2 Replies
Posted on Wednesday, 15 May 2024
  • New
  • When is CComment compatible with Joomla 5?
    When is CComment compatible with Joomla 5?...
    4 Replies
    Posted on Tuesday, 05 December 2023
    • #CComment
    • #Joomla 5
    _MATUKIO_NO_EVENTS appears in the frontend if no e
    Hello, there ist still the problem, that on the frontpage appears COM_MATUKIO...
    2 Replies
    Posted on Sunday, 12 May 2024
  • New
  • verschiedene URL's für Kursübersicht einer Kategor
    Hallo, ich habe eine Frage in Bezug auf SEO: ein externer Spezialist macht die...
    3 Replies
    Posted on Monday, 29 April 2024