There are 2 filters in the form of selects, when choosing jsom, I pass parameters to the URL.
введите сюда код
http: // timelate / stuff? dep-id = 158
What can parse the URL in JS so that when the second filter is selected, the parameter is concatenated into the first one, that is,
http: // timelate / stuff? dep-id = 158 & date = 2016-02-19
Well, if you change one of them so that the values change and all other parameters remain!
$('#dep-filter').change(function(){ $id = $(this).val(); location.href = '/stuff?dep-id=' + $id; }); $('#month-filter').change(function(){ $date = $(this).val(); location.href = '/stuff?month=' + $date; });