So here are the other Queries related to this Topic …..
- How to overwrite the jquery script in wordpress ?
- jQuery overwrite the script in wordpress ?
- How to overwrite the jquery smooth scroll script ?
- How to overwrite the wp theme jquery script ?
Here is the way to overwrite the custom script with wordpress theme..
Below is smooth scroll jQuery script that is overwrite the wordpress theme scroll script…
Note :~ Please change the bottom code div element as per yours.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#nst-menu a").click(function(event) {
event.stopPropagation();
var idd = jQuery(this).attr('href').replace( "/", "" );
jQuery('html, body').animate({
scrollTop: jQuery(idd).offset().top 30
}, 1500);
});
});
</script>
Add the script in the footer or using any plugin that can help you to put the script to footer..
There are many plugin like :~ Insert Headers And Footers .
In the Script event.stopPropagation(); function helps you to stop the current action and apply the new action using this script.
I hope this will help you.. and if you still have any other queries then can contact me with the chat box or by using contact form.
Thanks