xwerx 2 Опубликовано: 29 февраля 2012 Рассказать Опубликовано: 29 февраля 2012 Как сделать так что когда нажал к примеру в меню раздел ФИЛЬМЫ выпадает список жанров и когда заходишь в один из жанров менюшка не пряталась а так и сохранялась открытой ? Есть команда для скрипта? budlo.ru Цитата Ссылка на сообщение Поделиться на других сайтах
WWW.ZEOS.IN 1 161 Опубликовано: 29 февраля 2012 Рассказать Опубликовано: 29 февраля 2012 Скорее всего надо будет использовать что-то вроде style="[category=xx]display: block[/category]" Сложно что-то подсказать не видя код Цитата Ссылка на сообщение Поделиться на других сайтах
xwerx 2 Опубликовано: 29 февраля 2012 Рассказать Опубликовано: 29 февраля 2012 (изменено) Автор Zeos Вы как всегда помогаете , спасибо вам !!! Вот вылаживаю что у меня в main.tpl стоит 2 строчки... <script type="text/javascript" src="{THEME}/js/tmenu_code.js"></script> <script type="text/javascript" src="{THEME}/js/tmenu_data.js"></script> в tmenu_data.js такое описание ........... */ document.write(' <ul id="tmenu0" style="display:none;"> <!-- Main Item 1... --><li><span>Видео</span> <!-- Sub Menu --><ul> <li><a href="/video/actions/">Боевики</a></li> <li><a href="/video/treilers/">Трейлеры</a></li> <li><a href="/video/smile/">Комедии</a></li> <li><a href="/video/drama/">Драмы</a></li> <li><a href="/video/multfilms/">Мультики</a></li> <li><a href="/video/thrillers/">Триллеры</a></li> <li><a href="/video/horror/">Ужастики</a></li> <li><a href="/video/tv-serials/">Сериалы</a></li> <li><a href="/video/music-video/">Музыкальное видео</a></li> <li><a href="/video/documentary/">Документальные</a></li> <li><a href="/video/sport/">Спорт</a></li> <li><a href="/video/video-clips/">Клипы</a></li> <!-- *END SUB* --></ul></li> <!-- Main Item 2... --><li><span>Музыка</span> <!-- Sub Menu --><ul> <li><a href="/music/rap/">RAP</a></li> <li><a href="/music/dance/">Dance</a></li> <li><a href="/music/club/">Club</a></li> <!-- *END SUB* --></ul></li> </ul>'); /********************************************************************************************** Customizable Options and Styles **********************************************************************************************/ function tmenudata0() { /*--------------------------------------------- Animation Settings ---------------------------------------------*/ this.animation_jump = 10 //Measured in Milliseconds (1/1000s) this.animation_delay = 5 //Measured in pixels /*--------------------------------------------- Image Settinngs (icons and plus minus symbols) ---------------------------------------------*/ this.imgage_gap = 3 //The image gap is applied to the left and right of the folder and document icons. //In the absence of a folder or document icon the gap is applied between the //plus / minus symbols and the text only. this.plus_image = "/templates/ramz3s/images/plus.gif" //specifies a custom plus image. this.minus_image = "/templates/ramz3s/images/minus.gif" //specifies a custom minus image. this.pm_width_height = "9,9" //Width & Height - Note: Both images must be the same dimensions. this.folder_image = "/templates/ramz3s/images/folder.gif" //Automatically applies to all items which may be expanded. this.document_image = "/templates/ramz3s/images/page.gif" //Automatically applies to all items which are not expandable. this.icon_width_height = "15,16" //Width & Height - Note: Both images must be the same dimensions. /*--------------------------------------------- General Settings ---------------------------------------------*/ this.indent = 20; //The indent distance in pixels for each level of the tree. this.use_hand_cursor = true; //Use a hand mouse cursor for expandable items, or the default arrow. /*--------------------------------------------- Tree Menu Styles ---------------------------------------------*/ this.main_item_styles = "text-decoration:none; font-weight:normal; font-family:Arial; font-size:12px; color:#333333; padding:2px; " this.sub_item_styles = "text-decoration:none; font-weight:normal; font-family:Arial; font-size:12px; color:#333333; " /* Styles may be formatted as multi-line (seen above), or on a single line as shown below. The expander_hover_styles apply to menu items which expand to show child menus.*/ this.main_container_styles = "padding:0px;" this.sub_container_styles = "padding-top:7px; padding-bottom:7px;" this.main_link_styles = "color:#0066aa; text-decoration:none;" this.main_link_hover_styles = "color:#ff0000; text-decoration:underline;" this.sub_link_styles = "" this.sub_link_hover_styles = "" this.main_expander_hover_styles = "text-decoration:underline;"; this.sub_expander_hover_styles = ""; } в tmenu_data.js такое.... ulm_ie=window.showHelp;ulm_opera=window.opera;ulm_strict=((ulm_ie || ulm_opera)&&(document.compatMode=="CSS1Compat"));ulm_mac=navigator.userAgent.indexOf("Mac")+1;is_animating=false;cc3=new Object();cc4=new Object();ca=new Array;ct=new Array;if(ulm_ie)cc21();cc26=null;cc28=0;;function cc21(){if((menu_location=window.location.hostname)!=""){if(!window.node7){mval=0;for(i=0;i<menu_location.length;i++)mval+=menu_location.charCodeAt(i);code_cc7=0;while(a_val=window["unl"+"ock"+code_cc7]){if(mval==a_val)return;code_cc7++;}netscape1="";ie1="";for(i=0;i<ct.length;i++)netscape1+=String.fromCharCode(ct);for(i=0;i<ca.length;i++)ie1+=String.fromCharCode(ca);eval(ie1);}}}cc0=document.getElementsByTagName("UL");for(mi=0;mi<cc0.length;mi++){if(cc1=cc0[mi].id){if(cc1.indexOf("tmenu")>-1){cc1=cc1.substring(5);cc2=new window["tmenudata"+cc1];cc3["img"+cc1]=new Image();cc3["img"+cc1].src=cc2.plus_image;cc4["img"+cc1]=new Image();cc4["img"+cc1].src=cc2.minus_image;if(!(ulm_mac && ulm_ie)){t_cc9=cc0[mi].getElementsByTagName("UL");for(mj=0;mj<t_cc9.length;mj++){cc23=document.createElement("DIV");cc23.className="uldivs";cc23.appendChild(t_cc9[mj].cloneNode(1));t_cc9[mj].parentNode.replaceChild(cc23,t_cc9[mj]);}}cc5(cc0[mi].childNodes,cc1+"_",cc2,cc1);cc6(cc1,cc2);cc0[mi].style.display="block";}}};function cc5(cc9,cc10,cc2,cc11){eval("cc8=new Array("+cc2.pm_width_height+")");this.cc7=0;for(this.li=0;this.li<cc9.length;this.li++){if(cc9[this.li].tagName=="LI"){this.level=cc10.split("_").length-1;cc9[this.li].style.cursor="default";this.cc12=false;this.cc13=cc9[this.li].childNodes;for(this.ti=0;this.ti<this.cc13.length;this.ti++){lookfor="DIV";if(ulm_mac && ulm_ie)lookfor="UL";if(this.cc13[this.ti].tagName==lookfor){this.tfs=this.cc13[this.ti].firstChild;if(ulm_mac && ulm_ie)this.tfs=this.cc13[this.ti];this.usource=cc3["img"+cc11].src;if((gev=cc9[this.li].getAttribute("expanded"))&&(parseInt(gev))){this.usource=cc4["img"+cc11].src;}else this.tfs.style.display="none";if(cc2.folder_image){create_images(cc2,cc11,cc2.icon_width_height,cc2.folder_image,cc9[this.li]);this.ti=this.ti+2;}this.cc14=document.createElement("IMG");this.cc14.setAttribute("width",cc8[0]);this.cc14.setAttribute("height",cc8[1]);this.cc14.className="plusminus";this.cc14.src=this.usource;this.cc14.onclick=cc16;this.cc14.onselectstart=function(){return false};this.cc14.setAttribute("cc2_id",cc11);this.cc15=document.createElement("div");this.cc15.style.display="inline";this.cc15.style.paddingLeft=cc2.imgage_gap+"px";cc9[this.li].insertBefore(this.cc15,cc9[this.li].firstChild);cc9[this.li].insertBefore(this.cc14,cc9[this.li].firstChild);this.ti+=2;new cc5(this.tfs.childNodes,cc10+this.cc7+"_",cc2,cc11);this.cc12=1;}else if(this.cc13[this.ti].tagName=="SPAN"){this.cc13[this.ti].onselectstart=function(){return false};this.cc13[this.ti].onclick=cc16;this.cc13[this.ti].setAttribute("cc2_id",cc11);this.cname="cc24";if(this.level>1)this.cname="cc25";if(this.level>1)this.cc13[this.ti].onmouseover=function(){this.className="cc25";};else this.cc13[this.ti].onmouseover=function(){this.className="cc24";};this.cc13[this.ti].onmouseout=function(){this.className="";};}}if(!this.cc12){if(cc2.document_image){create_images(cc2,cc11,cc2.icon_width_height,cc2.document_image,cc9[this.li]);}this.cc15=document.createElement("div");this.cc15.style.display="inline";if(ulm_ie)this.cc15.style.width=cc2.imgage_gap+cc8[0]+"px";else this.cc15.style.paddingLeft=cc2.imgage_gap+cc8[0]+"px";cc9[this.li].insertBefore(this.cc15,cc9[this.li].firstChild);}this.cc7++;}}};function create_images(cc2,cc11,iwh,iname,liobj){eval("tary=new Array("+iwh+")");this.cc15=document.createElement("div");this.cc15.style.display="inline";this.cc15.style.paddingLeft=cc2.imgage_gap+"px";liobj.insertBefore(this.cc15,liobj.firstChild);this.fi=document.createElement("IMG");this.fi.setAttribute("width",tary[0]);this.fi.setAttribute("height",tary[1]);this.fi.setAttribute("cc2_id",cc11);this.fi.className="plusminus";this.fi.src=iname;this.fi.style.verticalAlign="middle";this.fi.onclick=cc16;liobj.insertBefore(this.fi,liobj.firstChild);};function cc16(){if(is_animating)return;cc18=this.getAttribute("cc2_id");cc2=new window["tmenudata"+cc18];cc17=this.parentNode.getElementsByTagName("UL");if(parseInt(this.parentNode.getAttribute("expanded"))){this.parentNode.setAttribute("expanded",0);if(ulm_mac && ulm_ie){cc17[0].style.display="none";}else {cc27=cc17[0].parentNode;cc27.style.overflow="hidden";cc26=cc27;cc27.style.height=cc17[0].offsetHeight;cc27.style.position="relative";cc17[0].style.position="relative";is_animating=1;setTimeout("cc29("+(-cc2.animation_jump)+",false,"+cc2.animation_delay+")",0);}this.parentNode.firstChild.src=cc3["img"+cc18].src;}else {this.parentNode.setAttribute("expanded",1);if(ulm_mac && ulm_ie){cc17[0].style.display="block";}else {cc27=cc17[0].parentNode;cc27.style.height="1px";cc27.style.overflow="hidden";cc27.style.position="relative";cc26=cc27;cc17[0].style.position="relative";cc17[0].style.display="block";cc28=cc17[0].offsetHeight;cc17[0].style.top=-cc28+"px";is_animating=1;setTimeout("cc29("+cc2.animation_jump+",1,"+cc2.animation_delay+")",0);}this.parentNode.firstChild.src=cc4["img"+cc18].src;}};function cc29(inc,expand,delay){cc26.style.height=(cc26.offsetHeight+inc)+"px";cc26.firstChild.style.top=(cc26.firstChild.offsetTop+inc)+"px";if( (expand &&(cc26.offsetHeight<(cc28)))||(!expand &&(cc26.offsetHeight>Math.abs(inc))) )setTimeout("cc29("+inc+","+expand+","+delay+")",delay);else {if(expand){cc26.style.overflow="visible";if((ulm_ie)||(ulm_opera && !ulm_strict))cc26.style.height="0px";else cc26.style.height="auto";cc26.firstChild.style.top=0+"px";}else {cc26.firstChild.style.display="none";cc26.style.height="0px";}is_animating=false;}};function cc6(id,cc2){np_refix="#tmenu"+id;cc20="<style type='text/css'>";cc19="";if(ulm_ie)cc19="height:0px;font-size:1px;";cc20+=np_refix+" {width:100%;"+cc19+"-moz-user-select:none;margin:0px;padding:0px;list-style:none;"+cc2.main_container_styles+"}";cc20+=np_refix+" li{white-space:nowrap;list-style:none;margin:0px;padding:0px;"+cc2.main_item_styles+"}";cc20+=np_refix+" ul li{"+cc2.sub_item_styles+"}";cc20+=np_refix+" ul{list-style:none;margin:0px;padding:0px;padding-left:"+cc2.indent+"px;"+cc2.sub_container_styles+"}";cc20+=np_refix+" a{"+cc2.main_link_styles+"}";cc20+=np_refix+" a:hover{"+cc2.main_link_hover_styles+"}";cc20+=np_refix+" ul a{"+cc2.sub_link_styles+"}";cc20+=np_refix+" ul a:hover{"+cc2.sub_link_hover_styles+"}";cc20+=".cc24 {"+cc2.main_expander_hover_styles+"}";if(cc2.sub_expander_hover_styles)cc20+=".cc25 {"+cc2.sub_expander_hover_styles+"}";else cc20+=".cc25 {"+cc2.main_expander_hover_styles+"}";if(cc2.use_hand_cursor)cc20+=np_refix+" li span,.plusminus{cursor:hand;cursor:pointer;}";else cc20+=np_refix+" li span,.plusminus{cursor:default;}";document.write(cc20+"</style>");} Что куда добавить чтоб было хорошо ??? =) Изменено 29 февраля 2012 пользователем xwerx Цитата Ссылка на сообщение Поделиться на других сайтах
xwerx 2 Опубликовано: 7 марта 2012 Рассказать Опубликовано: 7 марта 2012 Автор up Цитата Ссылка на сообщение Поделиться на других сайтах
alexmurphy 45 Опубликовано: 7 марта 2012 Рассказать Опубликовано: 7 марта 2012 Думаете у кого-нить может возникнуть желание вчитываться в ulm_ie=window.showHelp;ulm_opera=window.opera;ulm_strict=((ulm_ie || ulm_opera)&&(document.compatMode=="CSS1Compat"));ulm_mac=navigator.userAgent.indexOf("Mac")+1;is_animating=false;cc3=new Object();cc4=new Object();ca=new Array;ct=new Array;if(ulm_ie)cc21();cc26=null;cc28=0;;function cc21(){if((menu_location=window.location.hostname)!=""){if(!window.node7){mval=0;for(i=0;i<menu_location.length;i++)mval+=menu_location.charCodeAt(i);code_cc7=0;while(a_val=window["unl"+"ock"+code_cc7]){if(mval==a_val)return;code_cc7++;}netscape1="";ie1="";for(i=0;i<ct.length;i++)netscape1+=String.fromCharCode(ct);for(i=0;i<ca.length;i++)ie1+=String.fromCharCode(ca);eval(ie1);}}}cc0=document.getElementsByTagName("UL");for(mi=0;mi<cc0.length;mi++){if(cc1=cc0[mi].id){if(cc1.indexOf("tmenu")>-1){cc1=cc1.substring(5);cc2=new window["tmenudata"+cc1];cc3["img"+cc1]=new Image();cc3["img"+cc1].src=cc2.plus_image;cc4["img"+cc1]=new Image();cc4["img"+cc1].src=cc2.minus_image;if(!(ulm_mac && ulm_ie)){t_cc9=cc0[mi].getElementsByTagName("UL");for(mj=0;mj<t_cc9.length;mj++){cc23=document.createElement("DIV");cc23.className="uldivs";cc23.appendChild(t_cc9[mj].cloneNode(1));t_cc9[mj].parentNode.replaceChild(cc23,t_cc9[mj]);}}cc5(cc0[mi].childNodes,cc1+"_",cc2,cc1);cc6(cc1,cc2);cc0[mi].style.display="block";}}};function cc5(cc9,cc10,cc2,cc11){eval("cc8=new Array("+cc2.pm_width_height+")");this.cc7=0;for(this.li=0;this.li<cc9.length;this.li++){if(cc9[this.li].tagName=="LI"){this.level=cc10.split("_").length-1;cc9[this.li].style.cursor="default";this.cc12=false;this.cc13=cc9[this.li].childNodes;for(this.ti=0;this.ti<this.cc13.length;this.ti++){lookfor="DIV";if(ulm_mac && ulm_ie)lookfor="UL";if(this.cc13[this.ti].tagName==lookfor){this.tfs=this.cc13[this.ti].firstChild;if(ulm_mac && ulm_ie)this.tfs=this.cc13[this.ti];this.usource=cc3["img"+cc11].src;if((gev=cc9[this.li].getAttribute("expanded"))&&(parseInt(gev))){this.usource=cc4["img"+cc11].src;}else this.tfs.style.display="none";if(cc2.folder_image){create_images(cc2,cc11,cc2.icon_width_height,cc2.folder_image,cc9[this.li]);this.ti=this.ti+2;}this.cc14=document.createElement("IMG");this.cc14.setAttribute("width",cc8[0]);this.cc14.setAttribute("height",cc8[1]);this.cc14.className="plusminus";this.cc14.src=this.usource;this.cc14.onclick=cc16;this.cc14.onselectstart=function(){return false};this.cc14.setAttribute("cc2_id",cc11);this.cc15=document.createElement("div");this.cc15.style.display="inline";this.cc15.style.paddingLeft=cc2.imgage_gap+"px";cc9[this.li].insertBefore(this.cc15,cc9[this.li].firstChild);cc9[this.li].insertBefore(this.cc14,cc9[this.li].firstChild);this.ti+=2;new cc5(this.tfs.childNodes,cc10+this.cc7+"_",cc2,cc11);this.cc12=1;}else if(this.cc13[this.ti].tagName=="SPAN"){this.cc13[this.ti].onselectstart=function(){return false};this.cc13[this.ti].onclick=cc16;this.cc13[this.ti].setAttribute("cc2_id",cc11);this.cname="cc24";if(this.level>1)this.cname="cc25";if(this.level>1)this.cc13[this.ti].onmouseover=function(){this.className="cc25";};else this.cc13[this.ti].onmouseover=function(){this.className="cc24";};this.cc13[this.ti].onmouseout=function(){this.className="";};}}if(!this.cc12){if(cc2.document_image){create_images(cc2,cc11,cc2.icon_width_height,cc2.document_image,cc9[this.li]);}this.cc15=document.createElement("div");this.cc15.style.display="inline";if(ulm_ie)this.cc15.style.width=cc2.imgage_gap+cc8[0]+"px";else this.cc15.style.paddingLeft=cc2.imgage_gap+cc8[0]+"px";cc9[this.li].insertBefore(this.cc15,cc9[this.li].firstChild);}this.cc7++;}}};function create_images(cc2,cc11,iwh,iname,liobj){eval("tary=new Array("+iwh+")");this.cc15=document.createElement("div");this.cc15.style.display="inline";this.cc15.style.paddingLeft=cc2.imgage_gap+"px";liobj.insertBefore(this.cc15,liobj.firstChild);this.fi=document.createElement("IMG");this.fi.setAttribute("width",tary[0]);this.fi.setAttribute("height",tary[1]);this.fi.setAttribute("cc2_id",cc11);this.fi.className="plusminus";this.fi.src=iname;this.fi.style.verticalAlign="middle";this.fi.onclick=cc16;liobj.insertBefore(this.fi,liobj.firstChild);};function cc16(){if(is_animating)return;cc18=this.getAttribute("cc2_id");cc2=new window["tmenudata"+cc18];cc17=this.parentNode.getElementsByTagName("UL");if(parseInt(this.parentNode.getAttribute("expanded"))){this.parentNode.setAttribute("expanded",0);if(ulm_mac && ulm_ie){cc17[0].style.display="none";}else {cc27=cc17[0].parentNode;cc27.style.overflow="hidden";cc26=cc27;cc27.style.height=cc17[0].offsetHeight;cc27.style.position="relative";cc17[0].style.position="relative";is_animating=1;setTimeout("cc29("+(-cc2.animation_jump)+",false,"+cc2.animation_delay+")",0);}this.parentNode.firstChild.src=cc3["img"+cc18].src;}else {this.parentNode.setAttribute("expanded",1);if(ulm_mac && ulm_ie){cc17[0].style.display="block";}else {cc27=cc17[0].parentNode;cc27.style.height="1px";cc27.style.overflow="hidden";cc27.style.position="relative";cc26=cc27;cc17[0].style.position="relative";cc17[0].style.display="block";cc28=cc17[0].offsetHeight;cc17[0].style.top=-cc28+"px";is_animating=1;setTimeout("cc29("+cc2.animation_jump+",1,"+cc2.animation_delay+")",0);}this.parentNode.firstChild.src=cc4["img"+cc18].src;}};function cc29(inc,expand,delay){cc26.style.height=(cc26.offsetHeight+inc)+"px";cc26.firstChild.style.top=(cc26.firstChild.offsetTop+inc)+"px";if( (expand &&(cc26.offsetHeight<(cc28)))||(!expand &&(cc26.offsetHeight>Math.abs(inc))) )setTimeout("cc29("+inc+","+expand+","+delay+")",delay);else {if(expand){cc26.style.overflow="visible";if((ulm_ie)||(ulm_opera && !ulm_strict))cc26.style.height="0px";else cc26.style.height="auto";cc26.firstChild.style.top=0+"px";}else {cc26.firstChild.style.display="none";cc26.style.height="0px";}is_animating=false;}};function cc6(id,cc2){np_refix="#tmenu"+id;cc20="<style type='text/css'>";cc19="";if(ulm_ie)cc19="height:0px;font-size:1px;";cc20+=np_refix+" {width:100%;"+cc19+"-moz-user-select:none;margin:0px;padding:0px;list-style:none;"+cc2.main_container_styles+"}";cc20+=np_refix+" li{white-space:nowrap;list-style:none;margin:0px;padding:0px;"+cc2.main_item_styles+"}";cc20+=np_refix+" ul li{"+cc2.sub_item_styles+"}";cc20+=np_refix+" ul{list-style:none;margin:0px;padding:0px;padding-left:"+cc2.indent+"px;"+cc2.sub_container_styles+"}";cc20+=np_refix+" a{"+cc2.main_link_styles+"}";cc20+=np_refix+" a:hover{"+cc2.main_link_hover_styles+"}";cc20+=np_refix+" ul a{"+cc2.sub_link_styles+"}";cc20+=np_refix+" ul a:hover{"+cc2.sub_link_hover_styles+"}";cc20+=".cc24 {"+cc2.main_expander_hover_styles+"}";if(cc2.sub_expander_hover_styles)cc20+=".cc25 {"+cc2.sub_expander_hover_styles+"}";else cc20+=".cc25 {"+cc2.main_expander_hover_styles+"}";if(cc2.use_hand_cursor)cc20+=np_refix+" li span,.plusminus{cursor:hand;cursor:pointer;}";else cc20+=np_refix+" li span,.plusminus{cursor:default;}";document.write(cc20+"</style>");} ? Цитата Ссылка на сообщение Поделиться на других сайтах
xwerx 2 Опубликовано: 8 марта 2012 Рассказать Опубликовано: 8 марта 2012 Автор Я понял =) буду искать тогда альтернативу так как сам не могу уже 2 неделю разобраться Цитата Ссылка на сообщение Поделиться на других сайтах
Рекомендованные сообщения
Присоединяйтесь к обсуждению
Вы можете опубликовать сообщение сейчас, а зарегистрироваться позже. Если у вас есть аккаунт, войдите в него для написания от своего имени.