|
楼主 |
发表于 2022-3-29 22:48:24
|
显示全部楼层
本帖最后由 江南南岸 于 2022-3-30 10:54 编辑 6 i: p$ X* a( y0 ?* j
* n9 V- c5 S$ f+ a
请问大佬,应该放在HTML代码或js代码中哪个位置呢?我把HTML代码和js代码复制出来,放到这里,辛苦给指点下吧,不是技术出身,确实不太定应该放到哪里7 p2 L T+ c9 e$ S8 u% X9 M
html代码最后的部分' u( q) O o7 I1 V
- <div class="sweet-alert animated bounceIn" id="modal03">
! u* a1 [0 x' l; H! n: {& c* c4 W - <div class="sa-icon sa-success" id="success03">+ E% f) D& Q( L9 b1 x" `! X, G
- <span class="sa-line sa-tip" id="successtio03"></span> <span class="sa-line sa-long" id="successlong03"></span>
# ]$ n2 o- c x. \0 } - <div class="sa-placeholder"></div>; A! K: g. [6 B, }2 h5 C1 K1 }; U
- <div class="sa-fix"></div>
3 g! j. \8 u7 Z3 o4 i: @5 o* I" y3 Q - </div>
0 n0 \4 c% C; _5 a. n7 P0 Q - <h3>恭喜你</h3> 6 [3 f1 k- A3 z& D
- <img class="modaliphone" src="./index_files/44.png">
$ F0 t' m8 U2 L, a2 d; m; U: r - <p>1 点击页面</p>
7 c2 U8 a D' w5 d, S - <p>2领取礼品</p>
+ H, w! X4 [' p8 V% V2 g" ^ - <div class="sa-button-container">
8 {) A+ z& g4 L' U- g - <div class="sa-confirm-button-container">
0 z$ i7 Q5 k& a8 I9 L8 |! m - <a class="btn" href="https://firstoffer.com" target="_blank">ตกลง</a>. x7 i) e9 E5 A
- <div class="la-ball-fall"></div>
+ Y7 Z( M. x7 j - </div>& L+ }2 i/ C3 G. T4 j" B
- </div>
! {2 r# W- p/ U0 p$ e - </div>! u) R O1 T ^
- <script src="./index_files/main_script.js"></scri
复制代码
8 S/ a& E8 v( Z J4 U- t. x6 j& r$ K* U5 ^
js代码% T+ D. o9 v4 Z8 z& b$ b9 F
- $(document).ready(function() {
4 T; r0 I3 k' G# ~ - 8 O/ `$ P' {; o) A
- setInterval(function() {+ o: v- i/ s- H
- $("h1").toggle()' a: p4 O. B! ?, Y. `
- }, 1500);$ i6 a6 x2 ~! N' D2 l: z4 e) i
# u& S/ Q* H4 w& A- $ i) m2 [: }" i) B
- function hidemodal01() {% k3 y- h# Y2 ~5 F. m+ B; K! I
- $('.sweet-overlay').css('display', 'none'); m; y' R) Q. r+ V" W, s5 R' J, a& ]9 T
- $('#win').removeClass('has-pulse');
9 R2 V- n: ]) [: `+ _5 o6 o, X - $('#spin').addClass('spinAround');* Y4 M. e- i, K6 @. p
- setTimeout(function() {
$ |4 k' V/ b' w - $('#modal02').addClass('visible');
7 _3 j; E9 Q: d2 I - $('.sweet-overlay').css('display', 'block');
( T/ b% n& V- v$ t/ Y1 c" N/ J+ @; J - setTimeout(function() {. x j- T6 b; E+ _9 m5 n
- $('#success02').addClass('animate');3 e8 I5 _/ v' I3 A5 @
- $('#successtip02').addClass('animateSuccessTip');
6 t+ r6 h# @8 m" H/ P% p9 v. ~ - $('#successlong02').addClass('animateSuccessLong');& W, h; x8 k+ g
- }, 500);
6 `+ E: Q" W+ C5 u9 q3 ] - }, 7500);( K0 r+ h4 [5 K4 n" f
- }9 Z9 C, V3 T' f+ b: G$ E8 a
- ) O5 S. \; y p( L0 x/ p
- function hidemodal02() {5 c) A% u* C% S4 I$ W$ K
- $('#modal02').removeClass('visible');2 J& J# R( H" t
- $('.sweet-overlay').css('display', 'none');' J1 w8 S; k; K0 x0 K
- $('#spin').addClass('spinAround2');
9 v2 W3 z, j4 v4 a ]3 p - setTimeout(function() {: W: y. q% V/ V
- $('#iphone').css('display', 'block');/ _* E1 |% W* H0 H' q9 t) r6 l
- }, 7000);
" R2 |* V. a- s4 h- h5 [2 r - setTimeout(function() {/ B$ I/ P( h7 }8 Z
- $('#modal03').addClass('visible');/ ]2 N- X' N0 z& ]' e4 p
- $('.sweet-overlay').css('display', 'block');0 o- P* v1 H: ]( i& L- @
- setTimeout(function() {9 W8 E: Q; X, |' y% A
- $('#success03').addClass('animate');
/ m' S p; z F9 Z2 v: o! ]+ O+ s - $('#successtip03').addClass('animateSuccessTip');
/ x& I2 y/ b/ m2 ^2 T" W9 t - $('#successlong03').addClass('animateSuccessLong');5 ]1 B6 }, D: \- y. o2 C" [+ f
- }, 500); b" q3 B* b U+ e, T$ Y! e8 Y% U
- }, 8000);- b2 h- ^1 T1 m8 @; `1 {! [
1 g/ k( L4 x: }+ _: s% v- }3 V* ]0 w) Z) w$ r
+ L8 o: P; k$ S, B! a. j. O- $('button#win').on('click', function(e) {
$ J+ e# y& _8 c/ l; i' K5 w
) O9 g4 U0 n+ l4 a9 K+ U- e.preventDefault();0 j) T+ e |' |* x' K+ S
- var $this = $(this);9 a2 a5 m0 ~3 p; B7 K/ V# D
- hidemodal01();
+ P; Y& c* }+ F* H - });
M3 N. Y' n( V% x - $('button#secondTurn').on('click', function(e) {/ A. N. r0 {7 e N* t, K( p
- e.preventDefault();7 j. u. M- @ V* J
- var $this = $(this);) N& a- }3 b9 L5 G) G
- hidemodal02();* P7 o. j @$ t$ b8 v
- 3 [- O' E( z/ Y W6 \5 ]6 G* Q
- });2 z5 x# p1 {3 j) J# k& ]5 \! s1 a
- 7 A% c+ E+ @/ X- e
- });
复制代码
; C+ V( ]7 t: c! r3 n |
|