Question

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.

Était-ce utile?

La solution

Try this,

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

DEMO

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top