jeter20131220 %!s(int64=3) %!d(string=hai) anos
pai
achega
52f4247eaa
Modificáronse 3 ficheiros con 26 adicións e 13 borrados
  1. 1 1
      about/about.scss
  2. 8 1
      about/goto2.js
  3. 17 11
      goto.js

+ 1 - 1
about/about.scss

@@ -225,7 +225,7 @@ body {
                 }
             }
         }
-
+   
         ul {
 
             text-align: center;

+ 8 - 1
about/goto2.js

@@ -273,13 +273,20 @@ if (jQuery(window).width() < 767) {
         var y = window.scrollY;
     
         if (y > 550) {
-            $(".nav").css({"position":"fixed","top":"45px","margin":"10px auto","z-index":"10"});
+            $(".nav").css({"position":"fixed","top":"45px","left":"-1px","z-index":"10"});
         } else {
             $(".nav").css({"position":"static"});
         }
     
     });
 }
+
+// $(document).ready(function(){
+//     $(window).resize(function() {
+//         wdth=$(window).width();
+//       console.log(wdth)
+//     });
+// });
 $("*").each(function (index, element) {
     // 此元素被點選後執行
     $(this).click(function (e) {

+ 17 - 11
goto.js

@@ -54,8 +54,8 @@ console.log(28);
 // $(this).toggleClass('after-nav')
 //  })
 
-$(document).ready(function () {
 
+  function funcTest2(){
   $.ajax({
     method: "GET",
     url: "designer4.json",
@@ -103,7 +103,7 @@ $(document).ready(function () {
             </div>';
 
       bodyBannerDes += ' \
-            <img class="banner-img img-fluid" id="img_id"  src="'+ msg[arrIndex].workimg[arrIndex].img + '" alt="">\
+            <img class="banner-img img-fluid" id="img_id"  src="'+ msg[arrIndex].workimg[0].img + '" alt="">\
            ';
 
 
@@ -116,10 +116,12 @@ $(document).ready(function () {
       // $('#jsontest').append(test);
     });
 
+    // window.setInterval("funcTest2()",5000);
+    
+  }
+  window.onload = funcTest2();
 
 
-});
-
 // 點選該設計師,導至其對應id的參數網址
 
 $('#278').click(function () {
@@ -277,11 +279,15 @@ $('#491').click(function () {
 
 
 
+// function funcTest(){
+// $("div.sec01-designer div").sort(function(){
+//   return Math.random()*10 > 5 ? 1 : -1;
+// },).each(function(){
+//   var $t = $(this),
+//       color = $t.attr("");
+//   $t.css({backgroundColor: color}).appendTo( $t.parent() );
+// });
+// window.setInterval("funcTest()",5000);
+// }
 
-$("div.sec01-designer div").sort(function(){
-  return Math.random()*10 > 5 ? 1 : -1;
-}).each(function(){
-  var $t = $(this),
-      color = $t.attr("");
-  $t.css({backgroundColor: color}).appendTo( $t.parent() );
-});
+// window.onload = funcTest();