mercredi 11 novembre 2015

Checkboxes when created dynamically not getting checked/unchecked

I want on my web page, a list of checkboxes with links in front.

Here is a code that i am using

//data is json object
var htmlCode = "<ul>";
$.each(data, function(index, value) {
   htmlCode = htmlCode + "<div><input type='checkbox'/><a href='#'>"+value+"</a></div>";
});

It creates checkboxes links beside it however, i am just able to check an uncheck first checkbox in that list.

Why is it so? How can i get all checkboxes to be responsive?




Aucun commentaire:

Enregistrer un commentaire