Frage

I am having problems to display only the first input checked.

DEMO

The problem there is that is a list created by a PHP, so I just have to add JS to call the function checked="true" on the first one, I can't modify them by HTML.

War es hilfreich?

Lösung

Try this,

$('.nav-dropdown input[type=radio]:first').prop('checked', true);

DEMO

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top