Can anybody guide me how to append query string to current url using jquery but it should not get redirected to the new page. I mean it should simply get appended to the current url.
I have tried the following code but it’s not working.
$(".package-book a").click(function(){
window.location.url = "?id=" + $(this).val(<?php the_title(); ?>);
)};
Either change the code as above or you should echo into your php function
the_title()whatever you returning in this function.