Created
December 19, 2012 08:36
-
-
Save digitup/4335309 to your computer and use it in GitHub Desktop.
jQuery - onChange
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
$(function(){ | |
// bind change event to select | |
$('.countrySiteDropdown').bind('change', function () { | |
var url = $(this).val(); // get selected value | |
if (url) { // require a URL | |
window.location = url; // redirect | |
} | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment