Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
56
rated 0 times [  59] [ 3]  / answers: 1 / hits: 74128  / 13 Years ago, tue, april 5, 2011, 12:00:00

I am developing a small application in which I want to create 20 radio buttons in one row.



How can I do this using jQuery?


More From » jquery

 Answers
26

I think this will serve your purpose:





for (i = 0; i < 20; i++) {
var radioBtn = $('<input type=radio name=rbtnCount />');
radioBtn.appendTo('#target');
}

<script src=https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js></script>
<div id=target></div>




[#92906] Sunday, April 3, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
patienceannel

Total Points: 674
Total Questions: 101
Total Answers: 101

Location: Northern Mariana Islands
Member since Fri, Jan 15, 2021
3 Years ago
patienceannel questions
Fri, Mar 11, 22, 00:00, 2 Years ago
Tue, Oct 20, 20, 00:00, 4 Years ago
Wed, Jul 24, 19, 00:00, 5 Years ago
;