My current URL is http://localhost/create-story/galleries/wedding
Want to Make URL is http://localhost/create-story/galleries/wedding?query=VALUE_FROM_AJAX_RECIEVER
My Ajax function is
function liveSearch(val) {
$.ajax({
url: "{{ route('search_wedding') }}",
method: 'GET',
data: {query: val},
dataType: 'json',
success: function (data) {
$('#gallery').html(data);
}
})
}
$('#btn-bridal').on('click', function () {
liveSearch($(this).text());
});
Is It possible to change URL from AJAX after success? want to add request value In Url. Thanks
location.hreflocation.hrefwithout loading?