javascript - how to find the id of html element that is generated from json -
i generating html list items json. id equal id in json. can not refer id='thing'. question is, how i, in later functions, function refer id of object when know id = i?
html += "<li class='list-item ui-state-default addnewcontext' id=" + + ">" + card.card_name + ' - ' + card.price + "<button> x </button>" + "</li>" ; /
you have i
id. mean want reference element id?
var myobj = jquery("#" + i);
Comments
Post a Comment