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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

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