I am pretty new to JS - so just wondering whether you know how to solve this problem.
Current I have in my code
One option available to you is not to use href = "#"but instead href = "javascript:;" this will allow you to run the onclick handler whilst not scrolling.
href = "#"
href = "javascript:;"
For Example
Do Something