Skip to content

Instantly share code, notes, and snippets.

@psynaptic
Created February 27, 2012 12:50
Show Gist options
  • Save psynaptic/1923496 to your computer and use it in GitHub Desktop.
Save psynaptic/1923496 to your computer and use it in GitHub Desktop.
(function($) {
Drupal.behaviors.channelMenuSelect = {
attach: function (context, settings) {
$('#channel-menu-select').change(function() {
var $path_fragment = $(this).val();
if (IsNumeric($path_fragment) && $path_fragment != 0) {
window.location = Drupal.settings.mobile.channelMenuPath + $path_fragment;
}
});
}
}
}(jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment