Jelajahi Sumber

sec02 height

huai-sian 3 tahun lalu
induk
melakukan
ce0509c186
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      js/index.js

+ 7 - 0
js/index.js

@@ -2,7 +2,14 @@ window.onload = function(){
     if(screen.width < 900){
         window.location.href = "https://m3.hhh.com.tw/";   
     }
+    detectDirection ();
 }
+  
+  function detectDirection () {
+    let height = (window.screen.width * 5) / 12;
+    console.log(height);
+    $('.sec-02 .slide-item').css('height', `${height}px`);
+  }
 
 let result;
       $.ajax({