Skip to content

Instantly share code, notes, and snippets.

@digitup
Created December 19, 2012 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitup/4335309 to your computer and use it in GitHub Desktop.
Save digitup/4335309 to your computer and use it in GitHub Desktop.
jQuery - onChange
$(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