Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Javascrip in CSS

Empfohlene Antworten

Veröffentlicht

Hallo,

ich hab für eine ganz Anzahl von HTML-Sites ein nettes Stylesheet

geschrieben.

Diese ganzen Seiten sollen auch ein JavaScript-Dropdown-Menü

zur Navigation enthalten, und zwar dieses.

Ich wollte dieses nun direkt in einem DIV-Tag des Stylesheets aufrufen,

hab mich dazu begoogelt, aber leider nur 2 äußerst spärliche Sites

dazu gefunden:

http://www.quirksmode.org/css/javascript.html

und

http://milov.nl/2389 .

Hab nun ein bissel rumprobiert, am Ende ist in etwa folgendes Konstrukt

herausgeommen:


#naviDiv {

	background: url(

	'javascript:var menu = new COOLjsMenu("MainMenu", MENU_ITEMS);'

	)

}

Nun wird das Menü zumindest im Internet Explorer angezeigt, allerdings

funktionieren die Drop Downs nicht, und es gibt merkwürdige Scriptfehler.

Zudem wird nun der Rest des Stylesheets gänzlich ignoriert.

Der Firefox ignoriert das ganze Gebastel einfach und zeigt die Sites

nach wie vor ordentlichst mit Stylesheet aber eben ohne Menü an.

In den HTML-Files wird momentan noch im Header auf die

cooljsmenu.js und menu_item.js verwiesen.

Hat jemand eine Idee wie man das funktionsfähig bauen könnte?

Vielen Dank für eure Hilfe :)

Grüße

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.