Created
December 18, 2012 17:06
-
-
Save chaptastic/4329818 to your computer and use it in GitHub Desktop.
jquery callback setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("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