[jQuery] how to dynamically create a set of checkboxes?

[jQuery] how to dynamically create a set of checkboxes?


This is quite a newbie question about a jquery tutorial I found at
http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/
I wish to change the example so that the second box ('elements') contains a
set of checkboxes instead of a select list:
http://remysharp.com/wp-content/uploads/2007/09/select-chain.php
The .js is here:
http://remysharp.com/wp-content/uploads/2007/09/select-chain.js
I think I need to amend the document.createElement("OPTION") to something
like document.createElement("checkbox") but I am not sure and I do not know
what else to amend in the code.
Or if someone can show a simple way to create checkboxes dynamically it
would be a start.
--
View this message in context: http://www.nabble.com/how-to-dynamically-create-a-set-of-checkboxes--tp20889840s27240p20889840.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.