$("#createContractBtn").on("click", function(e) {
e.preventDefault()
$('html,body').animate({scrollTop: $("#contractLstTable").offset()}, {
duration: 1500,
complete: function() {
window.location = "{{ route('searchEnquiry', app()->getLocale()) }}?xxx=" + encryptedXXX;
}
});
})
I am trying to redirect to another page and have the page automatically scroll to its specific id of the page but it is not working even I tried different kinds of solutions. What is the possible way to have the page automatically scroll to specific ID while I clicked the button?
I have tried to modify the code with different ways but the scrolling effect still does not work