Created
December 29, 2011 02:56
-
-
Save brennovich/1531417 to your computer and use it in GitHub Desktop.
Unobtrusive Ajax Example for Rail 3.1
This file contains 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
$("select").change(function() { | |
var form = $(this.form); | |
$.post( | |
form.attr("action"), | |
form.serialize(), | |
null, | |
"script" // Datatype needed to format.js work | |
); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment