|
楼主 |
发表于 2022-3-29 22:48:24
|
显示全部楼层
本帖最后由 江南南岸 于 2022-3-30 10:54 编辑 / H0 j( w8 D' X" h# B, L
. l. {, d3 y0 Z2 ^( Q
请问大佬,应该放在HTML代码或js代码中哪个位置呢?我把HTML代码和js代码复制出来,放到这里,辛苦给指点下吧,不是技术出身,确实不太定应该放到哪里
T; I }" m" v% s' }html代码最后的部分" s& b& B0 J4 w: A7 V) w
- <div class="sweet-alert animated bounceIn" id="modal03">8 n; c/ ~' H% ?6 q& `( H* x0 X
- <div class="sa-icon sa-success" id="success03">
2 k+ ?7 K7 X% N' m$ m - <span class="sa-line sa-tip" id="successtio03"></span> <span class="sa-line sa-long" id="successlong03"></span>
9 W' Y# t% ~1 h' G- o1 Y - <div class="sa-placeholder"></div>* a$ W. o8 ^9 A3 \( ?
- <div class="sa-fix"></div>
; H' _8 f- c `$ L( u - </div>
% d, s- G# D% U* j" T( F/ _# ` - <h3>恭喜你</h3>
# K1 k% P7 o; H5 {3 `8 u S7 H- D. Z - <img class="modaliphone" src="./index_files/44.png">0 L( S; J& z. i' t3 C! o% L
- <p>1 点击页面</p>
. g4 V! O- o" y1 j - <p>2领取礼品</p>6 Z4 h2 w) F" x" F8 C
- <div class="sa-button-container">
/ K6 K* \ j* N- ~9 |2 m* a - <div class="sa-confirm-button-container">/ @# T9 @/ u% q" R) K
- <a class="btn" href="https://firstoffer.com" target="_blank">ตกลง</a>
* s$ P6 ], [7 {/ ?( A - <div class="la-ball-fall"></div>
( V+ }1 P# I$ i E C+ p - </div>; m9 R3 m8 E' E$ u% a
- </div>
& A# E. F9 s3 {8 V2 Z: @ - </div>) Y# \. h) ^. r% [+ A& d
- <script src="./index_files/main_script.js"></scri
复制代码 2 j* P, j2 D) @( P8 t& w% ~
2 y: k; D7 l% H( v5 w1 U/ M) p
js代码
' ?( n8 k: K( O3 b- $(document).ready(function() { H5 E; ~0 U- s
- + W: B, m8 q3 ^# [7 B
- setInterval(function() {
9 |; W) K/ t* @8 J- r% r - $("h1").toggle()
- Y% x7 H5 w: ]9 d+ I% ?+ Q9 [! n# [ - }, 1500);+ b5 Y; {0 A* q) {
- ! j( ~9 r' g- r" `0 P$ r& n
" p5 c/ F6 Q, M D9 r, [- function hidemodal01() {' N8 B- b8 _# S2 |
- $('.sweet-overlay').css('display', 'none');
2 A8 Q$ L8 ?% x - $('#win').removeClass('has-pulse');
0 p* U0 L& b8 P2 ]( L! [ - $('#spin').addClass('spinAround');6 r6 T2 x' l" ]. M0 b0 n
- setTimeout(function() {8 b5 r1 g, y( f3 l2 V4 D% Q
- $('#modal02').addClass('visible');; _# ~9 V* t& y
- $('.sweet-overlay').css('display', 'block');
& {2 `* b6 Z a5 L4 {& W2 W - setTimeout(function() {" L! h" B% h% `8 g
- $('#success02').addClass('animate');4 o; z$ m& r$ i. Z' v
- $('#successtip02').addClass('animateSuccessTip');6 X5 Y1 P2 W2 D; F$ T6 q
- $('#successlong02').addClass('animateSuccessLong');9 {. d6 D7 ?7 M* Z1 e
- }, 500);7 X5 q% E$ G" j' P
- }, 7500);
* P9 | `" G1 R9 w* M5 a8 ^/ _ - }
0 q3 }7 {& ^" {5 \* r$ w- D* Q - 0 Y+ m* g" w$ @( T% R
- function hidemodal02() {
6 ?7 I) A5 p9 C- c; C - $('#modal02').removeClass('visible');
" i# A5 c7 Y( g2 H - $('.sweet-overlay').css('display', 'none');
; ^) s# z5 p: [9 m4 P5 P2 V - $('#spin').addClass('spinAround2');
0 d! y% M% Q' U" Q - setTimeout(function() {+ O. f- O T$ j% ?; S' x- S
- $('#iphone').css('display', 'block');
3 J1 F$ @$ L; \0 G8 Z+ K: q - }, 7000);
& f o6 Z: E( W, x9 F, ~ - setTimeout(function() {
, x9 o7 J" ]/ h# f# y; k - $('#modal03').addClass('visible');
: }- o, K- s! b T& @ - $('.sweet-overlay').css('display', 'block');. G2 _) I6 K0 z) _# y
- setTimeout(function() {
) g( Q- F$ k, H$ q0 z& q2 D* i0 ] - $('#success03').addClass('animate');
6 B7 i& i+ T: | - $('#successtip03').addClass('animateSuccessTip');
9 P% d# Y ~, O, K$ O# K, l - $('#successlong03').addClass('animateSuccessLong');
) i/ c0 ^! H$ _+ _& O. k( R0 r4 V - }, 500);
& l2 ?1 O) c6 {* _) }5 r4 x3 ^! o - }, 8000);
' C6 S/ T& H8 p3 F
2 \! a8 T, J# x1 E4 x3 ]* {- }/ N6 Y. }7 |2 h. g( @8 @
- 0 A3 j. |' w3 X8 v- u O, q* k
- $('button#win').on('click', function(e) {
/ b( T4 c* A1 q! B$ x3 Z# ?. Z
* |3 I& }# p. ^' s3 Y9 N. D- e.preventDefault();6 ?: }6 q) C+ B
- var $this = $(this);3 k; ^5 C* A4 [) M
- hidemodal01();6 q0 x' L; \% Y' w% o
- });+ T9 }. x( y8 B7 A/ z8 ^7 @* ?
- $('button#secondTurn').on('click', function(e) {! D+ x* v( J2 ^
- e.preventDefault();2 ^3 ~' C3 V8 j& {; G
- var $this = $(this);
" S) \! k( c* l$ `& n& y - hidemodal02();
0 `) r4 C5 M3 t/ q* r - 0 t) n2 \% u2 s% s Y
- });
0 W6 w# q7 d; { - 3 ~2 a' B. b" O3 O! r+ U
- });
复制代码 * @4 n1 q' @) D# h
|
|