jquery scroll up not working on android

Solutions on MaxInterview for jquery scroll up not working on android by the best coders in the world

showing results for - "jquery scroll up not working on android"
Stacy
22 May 2017
1$(document).ready(function (){  
2  $('.scrollup').click(function(){
3    if (navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/)) {           
4      window.scrollTo(0,0);
5    }
6    else{
7      $('html,body').animate({
8        scrollTop: 0
9        }, 500, function(){
10        $('html,body').clearQueue();
11      });
12    }
13  });              
14});
15
16<div class="scrollup">
17    <svg height="35" viewBox="0 0 512 512" width="30">
18        <polygon points="396.6,352 416,331.3 256,160 96,331.3 115.3,352 256,201.5 "/>
19    </svg>
20</div>