I have a modal with a form and after i submit the form I get a sucess message. with the success message there is a link
<a href="#" id="register_again">Add another registration </a>
when I try to set this link to point to the current URL
jQuery(document).ready(function(){
var url = window.location.href;
jQuery('#register_again').attr('href', url + '®ister_again');
});
but it didn’t change the link and still #, it works fine without the modal if I put it as a normal html
So I was getting the success message via ajax and I just defined the url in the success function instead of adding normal JavaScript code to handle it.