SyntaxFix
Write A Post
Hire A Developer
Questions
For variety's sake:
var actions = {input1: "action1.php", input2: "action2.php"}; $("#input1, #input2").click(function() { $(this).closest("form").attr("action", actions[this.id]); });