var filter_caterer = $('#filter_caterer').val(); if (filter_caterer !== '') { url += '&filter_caterer=' + encodeURIComponent(filter_caterer); }