0

Here is what I have

$(".thoughts_box").blur(function(){
        var box_id= $(this).attr("id").split("_")[$(this).attr("id").split("_").length-1];
        //console.log($(this).attr("id") + " " + $(this).val());
        writeListValue(1,box_id,$(this).val());
    });
<table  width="100%" style="line-height:0px" >
    <tr>
        <td><p>1.</p></td>
        <td><input class="printArea_1 thoughts_box" name="activities_thoughts_1" id="activities_thoughts_1" type="text" style="width:345px;" placeholder="Type or click list button &gt;" /></td>
        <td><input type="button" id="thoughts_1"  class="list_btn ext_thoughts" value="List &gt;" name="_1" /></td>
    </tr>

1 Answer 1

0

Delegate the event.

Instead of

$(".thoughts_box").blur(function()

try

$(document).on("blur", ".thoughts_box", function()

or better

$('table').on("blur", ".thoughts_box", function()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.