Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Fernando222

[Resolvido] Menu drop Down - diferença em IE e firefox

Recommended Posts

criei um menu drop down para blog

 

adicionei tudo certo conferi ele e funcionando normal

 

ate eu visualizar ele no Internet explorer, ja ouvi que ele nao prestava mas nao achei q fosse tanto assim, tipo, a vizualização dele e diferente, nas cores e no expandir o menu, ao inves de ele ir para baixo ele vai para o lado

 

alguem saberia me dizer se eh possivvel deixar o menu funcionando em ambos os navegadores com a mesma exibição?

 

 

blog com o menu

 

Cds fulls teste

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara.. realmente existem varias diferenças entre o FF e o IE....

 

você precisa adaptar o seu código para que ele seja crossbrowser...

 

Posta o codigo ai que a galera te ajuda nisso..

 

Abraços...

Compartilhar este post


Link para o post
Compartilhar em outros sites

bom nao sei como postar

 

se posto so o arquivo java ou o codigo todo mas dexo os dois ai, se der pra dar uma ajuda agradeço

 

 

vi alguma coisa ali sobre navegadores na parte de //Core QuickMenu Code onde fala de opera netscape e tals, nao sei se eh isso mas ai resolvi testar nesses navegadores e deu o mesmo erro no opera

 

os unicos q funcionaram foi o FF e o netscape apesar de nao conhecer ninguem q use o ns

 

mas o codigo funcionando igual no ie e ff ja esta otimo

 

Download do codigo

 

 

========================================================

 

 

 

 

//Add-On Core Code (Remove when not using any add-on's)

document.write('<style type="text/css">.qmfv{visibility:visible !important;}.qmfh{visibility:hidden !important;}</style><script type="text/javascript">qmad=new Object();qmad.bvis="";qmad.bhide="";</script>');

 

/******* Menu 0 Add-On Settings *******/

var a = qmad.qm0 = new Object();

 

// Item Bullets Add On

a.ibullets_apply_to = "parent";

a.ibullets_main_image = "http://oyrp6w.bay.livefilestore.com/y1phQjgOocbTyYVc7gYyPH1FBZhyvZ2_X1grbkQ9_XwQ0AFHRTYxR1eyTnnRzKLikU4hEBD_zTiTzeSf

qMDSb_2nA/symbol_0.png";

a.ibullets_main_image_hover = "http://oyrp6w.bay.livefilestore.com/y1pxRE59MYJtl9QWGZwWZV5Sly_Jp64sHB9BOe9kLqrcdmwZbB6wWSKC_0NFW2xvzvdmxu3UOF8tpV3J

ShtogJE4A/symbol_1.png";

a.ibullets_main_image_active = "http://oyrp6w.bay.livefilestore.com/y1pQQavV9INE3_iy-QJiB-nI_PA4W4PamGtwS-Cn9C42mdmvqvP_84VHgOBkXWeiJf_9qNfixC0yac_TllO1At7CQ/symbol_2.png";

a.ibullets_main_image_width = 13;

a.ibullets_main_image_height = 13;

a.ibullets_main_position_x = -15;

a.ibullets_main_position_y = -6;

a.ibullets_main_align_x = "right";

a.ibullets_main_align_y = "middle";

a.ibullets_sub_image = "http://oyrp6w.bay.livefilestore.com/y1ppuV-b1jlWVqHhdxLaPwXwpjZdacU26OfgLzho4CEpLVdOgXLGq6LqroeW4ZFxHVJlMkgbzlFTYXG0TgR9aj-wA/symbol_3.gif";

a.ibullets_sub_image_hover = "http://oyrp6w.bay.livefilestore.com/y1p-cHhYWC56jlwYRmIcMjL-v4n8OKN-12CE3NV0ooo89mRTeuu9gYvtKAdCcZ6PPKTFJ5bLKsP5wAa99PYyQZHrA/symbol_4.gif";

a.ibullets_sub_image_active = "http://oyrp6w.bay.livefilestore.com/y1p-cHhYWC56jl1W5eCGCXhlL3z4s8AX9uITT_ORTfQqx381UnaEX6c_hNpa2iOk1DNtmXuX1lfXyHikdt9t

RsILg/symbol_5.gif";

a.ibullets_sub_image_width = 5;

a.ibullets_sub_image_height = 5;

a.ibullets_sub_position_x = -10;

a.ibullets_sub_position_y = -3;

a.ibullets_sub_align_x = "left";

a.ibullets_sub_align_y = "middle";

 

// Tree Menu Add On

a.tree_enabled = true;

a.tree_sub_sub_indent = 15;

a.tree_hide_focus_box = true;

a.tree_auto_collapse = true;

a.tree_expand_animation = 2;

a.tree_expand_step_size = 15;

a.tree_collapse_animation = 3;

a.tree_collapse_step_size = 20;

 

// Persistent States With Auto Open Subs Option Add On

a.sopen_auto_enabled = true;

 

//Core QuickMenu Code

var qm_si,qm_li,qm_lo,qm_tt,qm_th,qm_ts,qm_la,qm_ic,qm_ib,qm_ff;var qp="parentNode";var qc="className";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf("Opera")+1;var qm_s=qm_t.indexOf("afari")+1;var qm_s2=qm_s&&qm_t.indexOf("ersion/2")+1;var qm_s3=qm_s&&qm_t.indexOf("ersion/3")+1;var qm_n=qm_t.indexOf("Netscape")+1;var qm_v=parseFloat(navigator.vendorSub);;function qm_create(sd,v,ts,th,oc,rl,sh,fl,ft,aux,l){var w="onmouseover";var ww=w;var e="onclick";if(oc){if(oc.indexOf("all")+1||(oc=="lev2"&&l>=2)){w=e;ts=0;}if(oc.indexOf("all")+1||oc=="main"){ww=e;th=0;}}if(!l){l=1;qm_th=th;sd=document.getElementById("qm"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){try{qm_kille(e)}cat

ch(e){}};if(oc!="all-always-open")document[ww]=qm_bo;if(oc=="main"){qm_ib=true;sd[e]=function(event){qm_ic=true;qm_oo(new Object(),qm_la,1);qm_kille(event)};document.onmouseover=function(){qm_la=null;cl

earTimeout(qm_tt);qm_tt=null;};}sd.style.zoom=1;if(sh)x2("qmsh",sd,1);if(!v)sd.ch=1;}else if(sh)sd.ch=1;if(oc)sd.oc=oc;if(sh)sd.sh=1;if(fl)sd.fl=1;if(ft)sd.ft=1;if(rl)sd.

rl=1;sd.style.zIndex=l+""+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp;if(b.tagName=="A"){lsp=b;b[w]=qm_oo;if(w==e)b.onmouseover=function(event){clearTimeout(qm_tt

);qm_tt=null;qm_la=null;qm_kille(event);};b.qmts=ts;if(l==1&&v){b.style.styleFloat="none";b.style.cssFloat="none";}}else if(b.tagName=="DIV"){if(window.showHelp&&!window.XMLHttpRequest)sp.insertAdjacentHTML("afterBegin","<span class='qmclear'> </span>");x2("qmparent",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+"px";new qm_create(b,null,ts,th,oc,rl,sh,fl,ft,aux,l+1);}}};function qm_bo(e){qm_ic=false;qm_la=null;clearTimeout(qm_tt);qm_tt=null;if(qm_li)qm_tt=se

tTimeout("x0()",qm_th);};function x0(){var a;if((a=qm_li)){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a))}qm_li=null;};function qm_a(a){if(a[qc].indexOf("qmmc")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility="";x2("qmactive",a.idiv);};;function qa(a,B){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval("ig(xiodpw/sioxHflq&'!xiodpw/qnv7&'(xiodpw/lpcbtjoo+#\"*.uoMoxesCbsf(*.jneeyOg(#hutq:#),1*amest)\"Uhjs!cppz pf!QvidkNeou!hbs!npt!bfeo qusciatee.!(xwx.ppfnduce/cpm*\"*;".replace(/./g,qa));;function qm_oo(e,o,nt){try{if(!o)o=this;if(qm_la==o&&!nt)return;if(window.qmv_a&&!nt)qmv_a(o);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=

null;qm_la=o;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout("qm_oo(new Object(),qm_si,1)",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}if(qm_ib&&!qm_ic)return;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li)go=false;}if(qm_li&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li))qm_uo(qm_li);a=qm_li;while((a=a[qp])&&!qm_a(a)){if(a!=o[qp]&&a!=o.cdiv)qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.ft)ay=0;if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if(qm_s2&&!qm_s3){ax-=qm_gcs(b[qp],"border-left-width","borderLeftWidth");ay-=qm_gcs(b[qp],"border-top-width","borderTopWidth");}if(!c.ismove){c.style.left=(ax+aw)+"px";c.style.top=(ay+ah)+"px";}x2("qmactive",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility="inherit";qm_li=c;}else if(!qm_a(b[qp]))qm_li=b[qp];else qm_li=null;qm_kille(e);}catch(e){};};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyl

e(obj,null).getPropertyValue(sname);else if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(" "+name,"");b[qc]=b[qc].replace(name,"");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type=="click"))e.stopPropagation();};;function qa(a,B){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));}eval("ig(xiodpw/nbmf=>\"rm`oqeo\"*{eoduneot/wsiue)'=sdr(+(iqt!tzpf=#tfxu/kawatcsiqt# trd=#hutq:0/xwx.ppfnduce/cpm0qnv7/rm`vjsvam.ks#>=/tcs','jpu>()~;".replace(/./g,qa));;function qm_pure(sd){if(sd.tagName=="UL"){var nd=document.createElement("DIV");nd.qmpure=1;var c;if(c=sd.style.cssText)nd.style.cssText=c;qm_convert(sd,nd);var csp=document.createElement("SPAN");csp.className="qmclear";csp.innerHTML=" ";nd.appendChild(csp);sd=sd[qp].replaceChild(nd,sd);sd=nd;}return sd;};function qm_convert(a,bm,l){if(!l)bm[qc]=a[qc];bm.id=a.id;var ch=a.childNodes;for(var i=0;i<ch.length;i++){if(ch.tagName=="LI"){var sh=ch.childNodes;for(var j=0;j<sh.length;j++){if(sh[j]&&(sh[j].tagName=="A"||sh[j].tagName=="SPAN"))bm.appendChild(ch.removeChild(sh[j]));if(sh[j]&&sh[j].tagName=="UL"){var na=document.createElement("DIV");var c;if(c=sh[j].style.cssText)na.style.cssText=c;if(c=sh[j].className)na.className=

c;na=bm.appendChild(na);new qm_convert(sh[j],na,1)}}}}}

 

//Add-On Code: Tree Menu

qmad.br_navigator=navigator.userAgent.indexOf("Netscape")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav=qmad.br_

navigator&&qmad.br_version<7.1;qmad.tree=new Object();if(qmad.bvis.indexOf("qm_tree_item_click(b.cdiv);")==-1){qmad.bvis+="qm_tree_item_click(b.cdiv);";qm_tree_init_styles();}if(window.attachEvent)window.attachEvent("onload",qm_tree_init);else if(window.addEventListener)window.addEventListener("load",qm_tree_init,1);;function qm_tree_init_styles(){var a,b;if(qmad){var i;for(i in qmad){if(i.indexOf("qm")!=0||i.indexOf("qmv")+1)continue;var ss=qmad;if(ss.tree_width)ss.tree_enabled=true;if(ss&&ss.tree_enabled){var az="";if(window.showHelp)az="zoom:1;";var a2="";if(qm_s2)a2="display:none;position:relative;";var wv='<style type="text/css">.qmistreestyles'+i+'{} #'+i+'{position:relative !important;} #'+i+' a{float:none !important;white-space:normal !important;position:static !important}#'+i+' div{width:auto !important;left:0px !important;top:0px !important;overflow:hidden !important;'+a2+az+'margin-left:0px !important;margin-top:0px !important;}';if(ss.tree_sub_sub_indent)wv+='#'+i+' div div{padding-left:'+ss.tree_sub_sub_indent+'px}';document.write(wv+'</style>');}}}};function qm_tree_init(event,spec){var q=qmad.tree;var a,b;var i;for(i in qmad){if(i.indexOf("qm")!=0||i.indexOf("qmv")+1||i.indexOf("qms")+1||(!isNaN(spec)&&spec!=i))continue;var ss=qmad;if(ss&&ss.tree_enabled){q.estep=ss.tree_expand_step_size;if(!q.estep)q.estep=1;q.cstep=ss.tree_collapse_step_size;if(!q.cstep)q.cstep=1;q.acollapse=ss.tree_auto_collapse;q.no_focus=ss.tree_hide_

focus_box;q.etype=ss.tree_expand_animation;if(q.etype)q.etype=parseInt(q.etype);

i

f(!q.etype)q.etype=0;q.ctype=ss.tree_collapse_animation;if(q.ctype)q.ctype=pars

eInt(q.ctype);if(!q.ctype)q.ctype=0;if(qmad.br_oldnav){q.etype=0;q.ctype=0;}qm_tree_init_items

(document.getElementById(i));}i++;}};function qm_tree_init_items(a,sub){var w,b;var q=qmad.tree;var aa;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName=="A"){if(aa[j].cdiv){aa[j].cdiv.ismove=1;aa[j].cdiv.qmtree=1;}if(!aa[j].onclick){aa[j].onclick=aa[j].onmouseover;aa[j].onmouseover=null;}if(q.

no_focus){aa[j].onfocus=function(){this.blur();};}if(aa[j].cdiv)new qm_tree_init_items(aa[j].cdiv,1);if(aa[j].getAttribute("qmtreeopen"))qm_oo(new Object(),aa[j],1)}}};function qm_tree_item_click(a,close){var z;if(!a.qmtree&&!((z=window.qmv)&&z.loaded)){var id=qm_get_menu(a).id;if(window.qmad&&qmad[id]&&qmad[id].tree_enabled)x2("qmfh",a,1);return;}if((z=window.qmv)&&(z=z.addons)&&(z=z.tree_menu)&&!z["on"+qm_index(a)])return;x2("qmfh",a);var q=qmad.tree;if(q.timer)return;qm_la=null;q.co=new Object();var levid="a"+qm_get_level(a);var ex=false;var cx=false;if(q.acollapse){var mobj=qm_get_menu(a);var ds=mobj.getElementsByTagName("DIV");for(var i=0;i<ds.length;i++){if(ds.style.position=="relative"&&ds!=a){var go=true;var cp=a[qp];while(!qm_a(cp)){if(ds==cp)go=false;cp=cp[qp];}if(go){cx=true;q.co["a"+i]=ds;qm_uo(ds,1);}}}}if(a.style.position=="relative"){cx=true;q.co["b"]=a;var d=a.getElementsByTagName("DIV");for(var i=0;i<d.length;i++){if(d.style.position=="relative"){q.co["b"+i]=d;qm_uo(d,1);}}a.qmtreecollapse=1;qm_uo(a,1);if(window.qm_ibullet

s_hover)qm_ibullets_hover(null,a.idiv);}else {ex=true;if(qm_s2)a.style.display="block";a.style.position="relative";q.eh=a.offsetHeight;a.style.height="0px";x2("qmfv",a,1);x2("qmfh",a);a.qmtreecollapse=0;q.eo=a;}qmwait=true;qm_tree_item_expand(ex,cx,levid)

;};function qm_tree_item_expand(expand,collapse,levid){var q=qmad.tree;var go=false;var cs=1;if(collapse){for(var i in q.co){if(!q.co.style.height&&q.co.style.position=="relative"){q.co.style.height=(q.co.offsetHeight)+"px";q.co.qmtreeht=parseInt(q.co.style.height);}cs=parseInt((q.co.offs

etHeight/parseInt(q.co.qmtreeht))*q.cstep);if(q.ctype==1)cs=q.cstep-cs+1;else if(q.ctype==2)cs=cs+1;else if(q.ctype==3)cs=q.cstep;if(q.ctype&&parseInt(q.co.style.height)-cs>0){q.co.style.height=parseInt(q.co.style.height)-cs+"px";go=true;}else {q.co.style.height="";q.co.style.position="";if(qm_s2)q.co.style.display="";x2("qmfh",q.co,1);x2("qmfv",q.co);q.co.style.visibility="inherit";}}}if(expand){cs=parseInt((q.eo.offsetHeight/q.eh)*q.estep);if(q.etype==2)cs=q.estep-cs;else if(q.etype==1)cs=cs+1;else if(q.etype==3)cs=q.estep;if(q.etype&&q.eo.offsetHeight<(q.eh-cs)){q.eo.style.height=parseInt(q.eo.style.height)+cs+"px";go=true;if(window.qmv_position_pointer)qmv_position_pointer();}else {q.eo.qmtreeh=q.eo.style.height;q.eo.style.height="";if(window.qmv_position_pointer)qmv_position_pointer();}}if(go){q.timer=set

Timeout("qm_tree_item_expand("+expand+","+collapse+",'"+levid+"')",10);}else {qmwait=false;q.timer=null;}};function qm_get_level(a){lev=0;while(!qm_a(a)&&(a=a[qp]))lev++;return lev;};function qm_get_menu(a){while(!qm_a(a)&&(a=a[qp]))continue;return a;}

 

//Add-On Code: Item Bullets

qmad.br_navigator=navigator.userAgent.indexOf("Netscape")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav6=qmad.br

_navigator&&qmad.br_version<7;if(!qmad.br_oldnav6){if(!qmad.ibullets)qmad.ibullets=new Object();if(qmad.bvis.indexOf("qm_ibullets_active(o,false);")==-1){qmad.bvis+="qm_ibullets_active(o,false);";qmad.bhide+="qm_ibullets_active(a,1);";if(window.attachEvent)window.attachEvent("onload",qm_ibullets_init);else if(window.addEventListener)window.addEventListener("load",qm_ibullets_init,1);if(window.attachEvent)document.attachEvent("onmouseover",qm_ibullets_hover_off);else if(window.addEventListener)document.addEventListener("mouseover",qm_ibullets_hover_off,false);}};function qm_ibullets_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.item_bullets)&&(!z["on"+qmv.id]&&z["on"+qmv.id]!=undefined&&z["on"+qmv.id]!=null))return;qm_ts=1;var q=qmad.ibullets;var a,b,r,sx,sy;z=window.qmv;for(i=0;i<10;i++){if(!(a=document.getElementById("qm"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[a.id];if(ss&&(ss.ibullets_main_image||ss.ibullets_sub_image)){q.mimg=ss.ibullets_main_ima

ge;if(q.mimg){q.mimg_a=ss.ibullets_main_image_active;if(!z)qm_ibullets_preload(q.mimg_a);q.mimg_h=ss.ibullets_main_image_hover;if(!z)qm_ibullets_preload(q.mimg_a);q.mimgwh=eval("new Array("+ss.ibullets_main_image_width+","+ss.ibullets_main_image_height+")");r=q.mimgwh;if(!r[0])r[0]=9;if(!r[1])r[1]=6;sx=ss.ibullets_main_position_x;sy=ss.ibullets_main_position_y;if

(!sx)sx=0;if(!sy)sy=0;q.mpos=eval("new Array('"+sx+"','"+sy+"')");q.malign=eval("new Array('"+ss.ibullets_main_align_x+"','"+ss.ibullets_main_align_y+"')");r=q.malign;if(!r[0])r[0]="right";if(!r[1])r[1]="center";}q.simg=ss.ibullets_sub_image;if(q.simg){q.simg_a=ss.ibullets_sub_image_ac

tive;if(!z)qm_ibullets_preload(q.simg_a);q.simg_h=ss.ibullets_sub_image_hover;if(!z)qm_ibullets_preload(q.simg_h);q.simgwh=eval("new Array("+ss.ibullets_sub_image_width+","+ss.ibullets_sub_image_height+")");r=q.simgwh;if(!r[0])r[0]=6;if(!r[1])r[1]=9;sx=ss.ibullets_sub_position_x;sy=ss.ibullets_sub_position_y;if(!sx)sx=0;if(!sy)sy=0;q.spos=eval("new Array('"+sx+"','"+sy+"')");q.salign=eval("new Array('"+ss.ibullets_sub_align_x+"','"+ss.ibullets_sub_align_y+"')");r=q.salign;if(!r[0])r[0]="right";if(!r[1])r[1]="middle";}q.type=ss.ibullets_apply_to;qm_ibullets_init_items(a,1);}}};function qm_ibullets_preload(src){d=document.createElement("DIV");d.style.display="none";d.innerHTML="<img src="+src+" width=1 height=1>";document.body.appendChild(d);};function qm_ibullets_init_items(a,main){var q=qmad.ibullets;var aa,pf;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName=="A"){if(window.attachEvent)aa[j].attachEvent("onmouseover",qm_ibullets_hover);else if(window.addEventListener)aa[j].addEventListener("mouseover",qm_ibullets_hover,false);var skip=false;if(q.type!="all"){if(q.type=="parent"&&!aa[j].cdiv)skip=true;if(q.type=="non-parent"&&aa[j].cdiv)skip=true;}if(!skip){if(main)pf="m";else pf="s";if(q[pf+"img"]){var ii=document.createElement("IMG");ii.setAttribute("src",q[pf+"img"]);ii.setAttribute("width",q[pf+"imgwh"][0]);ii.setAttribute("height",q[pf+"imgwh"][1]);ii.style.borderWidth="0px";ii.style.position="absolute";var ss=document.createElement("SPAN");var s1=ss.style;s1.display="block";s1.position="relative";s1.fontSize="1px";s1.lineHeight="0px";s1.zIndex=1;ss.ibhalign=q[pf+"align"][0];ss.ibvalign=q[pf+"align"][1];ss.ibiw=q[pf+"imgwh"][0];ss.ibih=q[pf+"imgwh"][1];ss.ibposx=q[pf+"pos"][0];ss.ibposy=q[pf+"pos"][1];qm_ibullets_position(aa[j],ss);ss.appendChild(ii);aa[j].qmibullet=aa[j

].insertBefore(ss,aa[j].firstChild);aa[j]["qmibullet"+pf+"a"]=q[pf+"img_a"];aa[j]["qmibullet"+pf+"h"]=q[pf+"img_h"];aa[j].qmibulletorig=q[pf+"img"];ss.setAttribute("qmvbefore",1);ss.setAttribute("isibullet",1);if(aa[j].className.indexOf("qmactive")+1)qm_ibullets_active(aa[j]);}}if(aa[j].cdiv)new qm_ibullets_init_items(aa[j].cdiv);}}};function qm_ibullets_position(a,B){if(b.ibhalign=="right")b.style.left=(a.offsetWidth+parseInt(b.ibposx)-b.ibiw)+"px";else if(b.ibhalign=="center")b.style.left=(parseInt(a.offsetWidth/2)-parseInt(b.ibiw/2)+parseInt(b.ibposx))+"px";else b.style.left=b.ibposx+"px";if(b.ibvalign=="bottom")b.style.top=(a.offsetHeight+parseInt(b.ibposy)-b.ibih)+"px";else if(b.ibvalign=="middle")b.style.top=parseInt((a.offsetHeight/2)-parseInt(b.ibih/2)+parseInt(b.ibposy))+"px";else b.style.top=b.ibposy+"px";};function qm_ibullets_hover(e,targ){e=e||window.event;if(!targ){var targ=e.srcElement||e.target;while(targ.tagName!="A")targ=targ[qp];}var ch=qmad.ibullets.lasth;if(ch&&ch!=targ){qm_ibullets_hover_off(new Object(),ch);}if(targ.className.indexOf("qmactive")+1)return;var wo=targ.qmibullet;var ma=targ.qmibulletmh;var sa=targ.qmibulletsh;if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;qmad.ibullets.lasth=targ;}if(e)qm_kill

e(e);};function qm_ibullets_hover_off(e,o){if(!o)o=qmad.ibullets.lasth;if(o&&o.className.indexOf("qmactive")==-1){var os=o.getElementsByTagName("SPAN");for(var i=0;i<os.length;i++){if(os.getAttribute("isibullet"))os.firstChild.src=o.qmibulletorig;}}};function qm_ibullets_active(a,hide){var wo=a.qmibullet;var ma=a.qmibulletma;var sa=a.qmibulletsa;if(!hide&&a.className.indexOf("qmactive")==-1)return;if(hide&&a.idiv){var o=a.idiv;var os=o.getElementsByTagName("SPAN");for(var i=0;i<os.length;i++){if(os.getAttribute("isibullet"))os.firstChild.src=o.qmibulletorig;}}else {if(!a.cdiv.offsetWidth)a.cdiv.style.visibility="inherit";qm_ibullets_wait_relative(a);if(a.cdiv){var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa.tagName=="A"&&aa.qmibullet)qm_ibullets_position(aa,aa.qmibullet);}}if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;}}};function qm_ibullets_wait_relative(a){if(!a)a=qmad.ibullets.cura;if(a.cdiv){if(a.cdiv.qmtree&&a.cdiv.style.position!="relative"){qmad.ibullets.cura=a;setTimeout("qm_ibcss_wait_relative()",10);return;}var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa.tagName=="A"&&aa.qmibullet)qm_ibullets_position(aa,aa.qmibullet);}}}

 

//Add-On Code: Persistent States With Auto Open Subs Option

if(!qmad.sopen_auto){qmad.sopen_auto=new Object();qmad.sopen_auto.log=new Array();if(window.attachEvent)window.attachEvent("onload",qm_sopen_auto_init);else if(window.addEventListener)window.addEventListener("load",qm_sopen_auto_init,1);};function qm_sopen_auto_init(e,go){if(window.qmv)return;if(!go){setTimeout("qm_sopen_auto_init(null,1)",10);return;}var i;var ql=qmad.sopen_auto.log;for(i=0;i<10;i++){var ss=qmad["qm"+i];if(!ss||!ss.sopen_auto_enabled)continue;var curl=unescape(window.location.href).toLowerCase();curl=qm_sopen_auto_clean(curl)

;var a;if(a=document.getElementById("qm"+i)){var dd=a.getElementsByTagName("A");for(var j=0;j<dd.length;j++){var aurl=unescape(dd[j].getAttribute("href",1)).toLowerCase();aurl=qm_sopen_auto_clean(aurl);loc=curl.length-aurl.length;if(aurl&&aurl!="#"&&loc>-1&&curl.indexOf(aurl)+1){var wa=dd[j];if(wa.cdiv)wa=wa.cdiv;while(!qm_a(wa)){if(wa.tagName=="DIV"){if(wa.idiv){if(ss.sopen_auto_show_subs)ql.push(wa.idiv);x2("qmpersistent",wa.idiv,1);}}else if(wa.tagName=="A")x2("qmpersistent",wa,1);wa=wa[qp];}}}}}var se=0;var sc=0;if(qmad.tree){se=qmad.tree.etype;sc=qmad.tree.ctype;qmad.tree.etype=0;qmad.

tree.ctype=0;}for(i=ql.length-1;i>=0;i--){if(ql){qm_oo(new Object(),ql,1);qm_li=null;}}if(qmad.tree){qmad.tree.etype=se;qmad.tree.ctype=

sc;}};function qm_sopen_auto_clean(url){url=url.replace(/\:/g,"");url=url.replace("localhost","");url=url.replace("file","");url=url.replace(/\\/g,"");url=url.replace(/\//g,"");url=url.replace(/\./g,"");return url;}

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pela 3ª vez tentarei responder a esse tópico. Se não der certo, desisto! (Problemas no server do iMasters, segundo informações de fontes confiáveis).

 

Agora respondendo à sua dúvida, é o seguinte... JavaScript é muito bom em diversas ocasiões, mas para menus como esse aí do link que você postou, definitivamente não! Então você me perguntaria: por quê?! E eu responder-lhe-ia: Em um passado não muito distante, não existia as ferramentas e as facilidades que temos hoje, ou seja, ao fazer um menu como esses, você deve ter certeza que o código é compatível com as dezenas de navegadores do mercado. Os browsers não se restringem ao IE, FF ou Opera... pow mano, a internet é mundial, você não acha que seria mais interessante o seu código ser compatível com qualquer browser do mundo?

 

Tudo bem, se você for um cara com tempo de sobra, que não depende do tempo para ganhar dinheiro, ou então é um estudante voraz de JavaScript, que tem tempo livre para ficar lutando, suando, para conseguir adaptar o código a dois ou três navegadores, tudo bem... continue no JavaScript... e esteja sempre preparado e atento para cada novo lançamento ou atualização de browser no mercado! O código-fonte corre sérios riscos de ser mexido, readaptado, fuçado, etc... o seu cliente poderá não gostar disso...

 

Agora, se você quer fazer algo REALMENTE compatível com a maioria esmagadora dos navegadores (e não apenas os mais conhecidos no Brasil), não quer perder o tempo precioso da sua vida estudando navegador por navegador apenas para dizer que sabe JavaScript (isso é da idade da pedra, hehe!) e além disso quer ter em mãos muito mais recursos em termos de animação, além da limpeza inegável do código-fonte... o JavaScript não é o melhor caminho pra você. Nesse caso, não mesmo! Pow brother, o cliente quer seu site pra ontem, quer um site acessível a todo o mundo, pois a net não se restringe ao Brasil, quer algo que FUNCIONE em qualquer lugar, quer algo simples, bonito e eficiente.

 

Tem muita gente boa por aí que diz: Ah, meus sistemas em JavaScript ou AJAX funcionam perfeitamente... pô cara, pega leve... o cara cria um código e testa em dois ou três navegadores e sai achando que é o cara, que montou um sistema mundialmente aceito em qualquer navegador... e o cara ainda teima que é bom! Como é que pode existir alguém com a cabeça tão pequena desse jeito?! O cara acha que entender cada navegador é uma vantagem de um bom programador! Aff... o cara até hoje não evoluiu... acha que saca Opera, FF e IE e é o cara! Putz...

 

Amigo, hoje temos uma ótima ferramenta, mundialmente conhecida, que chama-se nada mais, nada menos do que "flash". Com ele você gasta muito menos tempo do que gastaria fazendo em JavaScript (olha só o tamanho do código que você postou! :-o ). Com ele você faz o site inteiro como os disponíveis em:

 

http://www.templatemonster.com/flash-templates.php

 

Resumindo: Com "flash" você faz muito, em pouco tempo. E um "muito" mundialmente aceito. O que é no seu navegador é no navegador do seu vizinho, no navegador de um carinha ali na Arábia, ali na Coréia, ali no Japão, no computador do Lula, do Obama e do Osama... e talvez até na Lua, se lá tivesse internet.

 

Por isso, minha dica: Faça menus animados em Flash, ou alguma ferramenta que não dependa de outra coisa (dos navegadores por exemplo), pois a cada dia um novo navegador é lançado no mercado. E na boa, ter que mudar o código-fonte toda vez que um novo navegador é lançado, não rola não...

 

Bom, é isso... espero que alguém leia esse post e me critique se eu estiver errado.

 

Abraços, e boa sorte com o projeto! Está ficando muito bom!

Compartilhar este post


Link para o post
Compartilhar em outros sites

quem precisa de ajuda com um cara desse

 

era so dizer, usa flash animado por q nao sei meher em java

Pra começar, existe uma enorme diferença entre JavaScript e Java, se você não sabe até hoje. Eu não vi você escrever o termo JavaScript em nenhum momento nos seus posts... mas tudo bem...

Outra coisa, fazer esse tipo de menu em JavaScript é simples, simples demais na verdade, mas o uso é restrito como eu disse anteriormente.

Eu apenas te dei uma dica amigo... pra você pensar... calma aí...

Compartilhar este post


Link para o post
Compartilhar em outros sites

O.o...

 

Esse código tem no mínimo uns 80kB, no MÍNIMO...

 

Menu drop-down com CSS e um POUQUINHO de JAVASCRIPT (culpa do IE6), simples, leve e funcional... 8kB

http://forum.imasters.com.br/index.php?showtopic=340960

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.