I have a URL ending with #/
, and I want to add the URL parameters that are selected in a select list to the URL and remove the #/
from URL.
$('#drop').on('change', function(e) {
if (e.handled !== true) {
e.handled = true;
var url = 'https://www.geoplug.docksal/sales/rentals#/';
// window.location.href = url + '?sort=' + this.value;
console.log(url + '?sort=' + this.value);
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<select id="drop">
<option selected>Open this select menu</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>