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

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -