[TYPO3-UG Dutch] menu active item style
Stephan de Bruin
stephan.de.bruin at dpdk.nl
Tue Nov 18 09:42:10 CET 2008
Hallo allemaal,
Ik heb een vraag over de rgaccordion extensie.
Ik wil de style van het actieve menu-item wijzigen, en dan met name de
menu-items waarbij de span .empty is.
Ik vermoed dat ik iets in mijn TS en/of menu.js (zie hieronden) moet
aanpassen, maar ik hen geen idee welke aanpassingen ik moet maken.
Alvast bedankt voor jullie hulp.
Groeten,
Stephan
Mijn TS:
####################
# RGACCORDION MENU
####################
lib.sense_menu = HMENU
lib.sense_menu {
entryLevel = 0
1 = TMENU
1 {
wrap = <ul id="rgaccordmenu">|</ul>
noBlur = 0
expAll = 1
NO = 1
NO.wrapItemAndSub = <li>|</li>
NO.linkWrap = <span class="empty">|</span>
IFSUB <.NO
IFSUB.linkWrap = <span class="toggle">|</span>
IFSUB.doNotLinkIt = 1
ACTIFSUB <.NO
ACTIFSUB.linkWrap = <span class="open toggle">|</span>
}
2 < .1
2 {
wrap = <ul class="content">|</ul>
NO.linkWrap >
IFSUB.linkWrap = <span class="toggle2">|</span>
ACTIFSUB.linkWrap = <span class="open toggle2">|</span>
}
}
Menu.js
###########
var accordion= '';var accordion2 = '';
window.addEvent('domready', function(){
accordion = new Accordion('span.toggle', 'ul.content', {
duration: 500,
transition: Fx.Transitions.Back.easeInOut,
display:-1,
alwaysHide:true,
opacity: true,
onActive: function(toggler, element){
toggler.addClass('act');
parentelement = element;
},
onBackground: function(toggler, element){
toggler.removeClass('act');
}
});
accordion2 = new Accordion('span.toggle2', 'ul.content2', {
display:false,
alwaysHide:true,
opacity: false,
onActive: function(toggler, element){
toggler.addClass('act2');
parentelement.setStyle('height', 'auto');
},
onBackground: function(toggler, element){
toggler.removeClass('act2');
}
});
//ul#top > li
function checkHash(){
var found = false;
var offset = 0;
var tmp = 0;
$$('#rgaccordmenu li span.toggle').each(function(anchorid, i) {
if (anchorid.hasClass('open toggle') && !found) {
accordion.display(offset);
found = true;
} else {
offset++;
}
});
// if (!found) accordion.display(0);
}
function checkHash2(){
var found = false;
var offset = 0;
var tmp = 0;
$$(' span.toggle2').each(function(anchorid, i) {
if (anchorid.hasClass('open') && !found) {
anchorid.addClass('open2');
accordion2.display(offset);
found = true;
} else {
offset++;
}
});
//if (!found) accordion2.display(0);
}
var x = new Chain();
x.chain(checkHash);
x.chain(checkHash2);
//x.callChain();
x.callChain.delay(1500, x);
});
More information about the TYPO3-UG-dutch
mailing list