jquery - Getting td value returns undefined -


i trying access td value of row above context. able row above prev() method , children children() method, when append find() selector onto that, unable find particular cell looking for.

when log return children() see table data have in there.

why cant find id? see code below.

$("#tblproducts tbody").on("click", "#btnsubmitupdate", function (e) {     var btnsaveupdate = $(this);      var tr = btnsaveupdate.closest("tr");      var trabove = $(tr.prev()[0]);     var desc = trabove.children().find("#tddescription").val();      //desc returning undefined     console.log(desc); }); 

i needed use find() directly trabove without using children. solved issue


Comments

Popular posts from this blog

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -