Skip to content Skip to sidebar Skip to footer

Adding Handler To Form Inside Div, In The Future

I am using the following code to direct the results from a form to a specific div. $(window).load(function () { $('#form1').submit(function() { $.post($(this).attr('action'

Solution 1:

The best place to add the handler is right after you know the element exists. So, right after this line:

$("#resultsDiv").html(html);

you can add your code that references $("#thefutureDivID").

Post a Comment for "Adding Handler To Form Inside Div, In The Future"