Browse Source

qrcode scanner test

Mike 3 years ago
parent
commit
c286fbb979
1 changed files with 7 additions and 2 deletions
  1. 7 2
      ArkCard-web/collect.html

+ 7 - 2
ArkCard-web/collect.html

@@ -373,10 +373,15 @@ $(".qrcode").click(function () {
     $('#qr-reader').toggle();
 
     if($("#qr-reader").is(":visible")){
-        alert("The QRCode Scanner is visible.");
+        alert("QRCode掃描器已開啟");
+
+        $('html, body').animate({
+		    scrollTop: $("#qr-reader").offset().top
+	    }, 0);
+        
         qrcode_scanner();
     } else {
-        alert("The QRCode Scanner is hidden.");
+        alert("QRCode掃描器已關閉");
     }
 });