Essentially, I have some code that needs to get the HTML of a parent element when any of its input elements blur. That's pretty simple. The problem is that the HTML returned when calling html() on the parent element, does not reflect the current value of the input elements contained within. That is, in Firefox or Chrome. It works in IE of all places.
Try changing "world" in the textbox to "everyone" and clicking the button. Note that I'm also appending $.now() so that you can see that the code is in fact executing.
As you can see, $("#parent").html() does not update, even though $("#child").val() does.
For your viewing pleasure, here's the HTML:
Get HTML.
The HTML for #parent is:
The value of #child is:
...and here's the JavaScript:
$("#separateEvent").click(function ()
{
$("#parentsHtml").val($("#parent").html() + "\r\n@" + $.now());
$("#childsValue").val($("#child").val() + "\r\n@" + $.now());
});