Browse Source

更新 'jquery.js'

WXT往昔 3 years ago
parent
commit
2295c169fa
1 changed files with 21 additions and 14 deletions
  1. 21 14
      jquery.js

+ 21 - 14
jquery.js

@@ -35,21 +35,28 @@ void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?voi
         },time);
     });
 }
+function text_each_add(id,value){
+    $(document).ready(function () {
+      
+      let i = 0;
+      let text_tabel = document.getElementById(id);
+      setInterval(function () {
+        if (i === value.length){
+          text_tabel.innerText = '';
+          // $(table).empty();
+          i=0;
+        }
+        // text_tabel.innerText = value[i];
+        text_tabel.append(value[i]);
+        // $(table).append(value[i]);
+        i++;
+      },100);
 
-let i = 0;
-let text_tabel = document.getElementById('erc')
-value = 'Hello Word';
-setInterval(function () {
-            if (i === value.length){
-                text_tabel.innerText = '';
-                // $(table).empty();
-                i=0;
-            }
-            // text_tabel.innerText = value[i];
-            text_tabel.append(value[i]);
-            // $(table).append(value[i]);
-            i++;
-        },100);
+      
+    })
+}
+
+text_each_add('erc','Hello Word')
 
 alert_s = function(value = '类容'){
     $('body').append(`