File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 7171 var tag = document . querySelector ( '.container' ) ; // the child element of body that contains the long content
7272 if ( ! tag ) return ;
7373 var elem = document . scrollingElement || document . body ;
74- if ( ! tag . classList ) {
75- alert ( 'Use newer browser!' ) ;
76- return ;
77- }
7874 if ( lock ) {
7975 var scrollTop = elem . scrollTop ;
8076 tag . classList . add ( 'no-scroll' ) ;
8985 </ script >
9086</ head >
9187< body >
92- < div class ="container ">
88+ < section class ="container ">
9389 < h2 > Prevent body scrolling: < button id ="action " onclick ="toggleLock() "> Disabled</ button > </ h2 >
94- < section onclick ="showPopup() ">
90+ < div onclick ="showPopup() ">
9591 < h3 > Click/tap anywhere for a popup</ h3 >
9692 < div class ="padding "> Multi line 1</ div >
9793 < div class ="padding "> Multi line 2</ div >
@@ -133,8 +129,8 @@ <h3>Click/tap anywhere for a popup</h3>
133129 < div class ="padding "> Multi line 38</ div >
134130 < div class ="padding "> Multi line 39</ div >
135131 < div class ="padding "> Multi line 40</ div >
136- </ section >
137- </ div >
132+ </ div >
133+ </ section >
138134 < div id ="popup ">
139135 < div class ="popup-content ">
140136 < strong > This is a modal popup!</ strong >
@@ -154,4 +150,4 @@ <h3>Click/tap anywhere for a popup</h3>
154150 </ div >
155151 </ div >
156152</ body >
157- </ html >
153+ </ html >
You can’t perform that action at this time.
0 commit comments