Created
May 17, 2018 11:37
-
-
Save aleksb86/7e185fef8d48b6b3fe16a8a73c0b67f6 to your computer and use it in GitHub Desktop.
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
# Simple GET: | |
$("body") | |
.on "change", "select#portfolio-select-year", () -> | |
selected_year = $("select#portfolio-select-year :selected").text() | |
url = "/fixes?selected_year=#{selected_year}" | |
$.get(url) | |
# GET with callback: | |
$("body") | |
.on "change", "select#portfolio-select-year", () -> | |
selected_year = $("select#portfolio-select-year :selected").text() | |
url = "/fixes?selected_year=#{selected_year}" | |
$.get(url), (data) -> | |
$("#some-element").html(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment