Hallo an alle :-)
Typo3 7.6.4
Bootstrap
ich habe folgendes Problem. Ich habe eine Menü mit Typoscript umgesetzt und eingebunden. Das funktioniert soweit auch ganz gut in der Desktopansicht. Schaue ich mir das Ganze nun in der Mobilen Ansicht an, so wird die Hover Funktion auf den Touchscreens ja nicht wirklich unterstützt. Daher möchte ich die Hoverfunktion für den Touchscreen durch klicken ersetzen und hier liegt meine Problem.
Ich bin soweit, dass ich weiß, das es wohl nur mit Javascript geht. In Javascript bin ich allerdings eine Niete.
Hier mein Menü:
lib.navbar { 10 { 1 { expAll = 1 NO { ATagBeforeWrap = 1 # linkWrap = | # linkWrap = <mark class="bar"></mark>  | wrapItemAndSub = <li>|</li> if { value = 4 isTrue = 1 } } 10.value = <li class="active">|</li> } } IFSUB { doNotLinkIt = 1 allWrap = <a href="#" class="dropdown-toggle" data-toggle="dropdown">|<b class="caret"></b></a> wrapItemAndSub = <li class="dropdown">|</li> } } 2 < .1 2 { IFSUB { doNotLinkIt = 1 allWrap = <a href="#" class="dropdown-toggle" data-toggle="dropdown">|<b class="caret"></b></a> wrapItemAndSub = <li class="dropdown">|</li> } } 3 < .1 3 { # wrap = <ul class="dropdown-submenu">|</ul> IFSUB > ACTIFSUB > CURIFSUB > } } }
Die CSS dazu:
.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { background-color: #ff0000; color: #fff; outline-color: -moz-use-text-color; outline-style: none; outline-width: 0; text-decoration-color: -moz-use-text-color; text-decoration-line: none; text-decoration-style: solid; } .dropdown-menu > li > a { clear: both; color: #333; display: block; font-weight: normal; line-height: 1.42857; padding-bottom: 3px; padding-left: 10px; padding-right: 20px; padding-top: 3px; white-space: nowrap; } /* optional */ .open > .dropdown-menu .dropdown-menu { top:-1px; left:50%; } .dropdown-menu { margin:0; width:220px; } /* must */ .open > .dropdown-menu li:hover .dropdown-menu { display: block; }
Gibt es da einen Weg ohne Javascript? Und wenn mit Javascript, wie muss das aussehen?
Gruß