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.

Javascript + jQuery mobile Dropdownbox funktioniert nicht

Empfohlene Antworten

Veröffentlicht

Moin Moin,

ich bin gerade dabei mich ein wenig in jQuery mobile, HTML5 und Javascript einzuarbeiten.

Mein Ziel ist es mehrere Comboboxen bzw. Dropdownboxen programmatisch in die HTML-Seite zu pflanzen.

Die Boxen werden auch angezeigt, lass sich auch bedienen - nur das jQuery mobile Design wird nicht übernommen. Wenn ich nun aber den "trigger("create")" verwende, wird das jQuery mobile Design übernommen, aber ich man kann die Dropdownboxen nicht mehr bedienen, es klappt nix mehr auf. Mit "$('select').selectmenu();" das gleiche.

Muss man die Boxen noch in irgendeiner (mir unbekannten) Weise refreshen?

Ausschnitte des Codes:

HTML:

<div data-role="content">

        <div class="ui-grid-a">

            <div class="ui-block-a" id="ui-block-a">

            </div>

            <div class="ui-block-b" id="ui-block-b">

            </div>

        </div>

    </div>
Javascript:
function SetWeight() {

    $.getJSON(serviceURL + 'weight.php', function (data) {

        weightPoints = data.items;

        // $('#standardList').append('<h3>' + reviewPoints[0].name_reviewPoints + '</h3>');

        $.each(weightPoints, function (index, weightPoint) {

            $('#ui-block-a').append('<h2>' + weightPoint.name_test + '</h2>');

            $('#ui-block-b').append('<select data-native-menu="false" id="id_' + weightPoint.name_test + '">' +

                '<option value="Value">Hoch</option><option value="Value">Mittel</option><option value="Value">Niedrig</option></select>').trigger("create");

        });

    });

}

Jemand einen heißen Tipp für mich?

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.