Skip to content

Instantly share code, notes, and snippets.

@chaptastic
Created December 18, 2012 17:06
Show Gist options
  • Save chaptastic/4329818 to your computer and use it in GitHub Desktop.
Save chaptastic/4329818 to your computer and use it in GitHub Desktop.
jquery callback setup
$("tr").each(function() {
var container = $(this);
var add_button = container.find("a.add");
var field_container = container.find("td.fields");
add_button.click(function() {
var new_elt = $("<div>...</div>");
field_container.append(new_elt);
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment