$(document).ready(function () { $('input[name="filter"]').change(function(e) { $(location).attr('href', $(e.target).data('url')); }); });