javascript - using html() to get changed content -


i have div need grab html contents of (so naturally use html())...

however, text fields. whenever grab contents of div (that contains text fields), grabs initial html , not data changed end user...

here js bin version..change input field, run function , see take initial value of field...

any way around this?

http://jsbin.com/oleni3/edit

http://jsbin.com/oleni3/5/edit

try out ^

the code:

$(document).ready(function() {   $('div#top input').change(function() {       $(this).attr('value', $(this).val());    });   $('#click').click(function() {     var _curhtml = $("div#top").html();     $("div#bottom").html(_curhtml);   });  }); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -