i have jquery string which have html ,
btn_response = '<input type="button" id="upload-btn5" style="margin-bottom: 7px;" class="btn btn-success clearfix" value="Choose file">';
the id attribute change every time , so i wonder how i can get id attribute value from that jquery string.
i tried
$(uploadBtn).data("id")
output
undefined
but no success !
can anybody help
$(uploadBtn).data("id")will select attributedata-idand$(uploadBtn).attr("id")will select id attribute