Created
November 8, 2012 15:21
-
-
Save stoplion/4039431 to your computer and use it in GitHub Desktop.
javascript: select box follow links
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
navigationify_select_boxes = (select_boxes...) -> | |
for select_box in select_boxes | |
($ select_box).live "change", (evt) -> | |
selected_option_url = $(evt.target).find("option:selected").val() | |
window.location = selected_option_url if selected_option_url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment