Search code examples
javascriptjqueryhtmlwebvisual-glitch

Website jump to start on image click, no "#" in HTML


I downloaded a unique template and I realized that on image click the website jumps to the start position. From there only grabbing the website and swiping it right helps but, then it works perfectly..otherwise it is stuck..and scrolling makes it jumping back and back. I looked through the CCS code and found nothing however I am really not an expert therefore I don't even know what I should look for. Also I found some interesting information on the internet that height-min attribute could solve these kind of problems...it didn't.

The template is using jquery plugins. I tried also to upgrade the jquery.min.js but nothing has changed. Also if I click not exactly on an image but on that panel (section) it is doing the same jump. I suppose it must be some script problem but have no clue what exactly...

These are the scripts which start on page load:

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/main.js"></script>

The template is also using saas components for the gallery if that could do anything with the phenomenon.

I uploaded the template to https://mymgmmedia.com/ I would really appreciate if anyone could take a look and by inspecting telling me where should I dig deeper or what should I look for.


Solution

  • This solved the problem, if anyone shall need it:

    momentumIntervalId = setInterval(function() {
    
    // Momentum is NaN? Bail.
    if (isNaN(m)) {
    
    clearInterval(momentumIntervalId);
        return;
    
                                            }