I am trying to run an .each on form subelements of some html returned in an AJAX request. Like so:
var myReturnedText = "some text returned from server that contains one or more forms..."; $("form").each( function() { $(this).removeAttr("onsubmit"); } ); What I am having trouble getting my head around is where to put the reference to the original text (myReturnedText), since it is a variable and not a DOM element.