Sorry i got wrong post.
You probably need to use event delegation if the elements are dynamically loaded:
$(document).on("click", "mydeletebtn", function(){
console.log($(this).prev().val());
});
Sorry i got wrong post.
You probably need to use event delegation if the elements are dynamically loaded:
$(document).on("click", "mydeletebtn", function(){
console.log($(this).prev().val());
});