This is about using
$ (document). On (' click ', selector,function)
Workaround for invalid use of On Click event in Mobile iOS
1. Add selector elements to the style Cursor:pointer
<style> . a{ width:100px; height:100px; background:red;}. b{ width:10px height:10px;cursor:pointer}</style><div class= "A" > <div class= "B" ></ Div></div><script> $ (document). On (' click ', '. B ', function () {console.log (' 22222 ')}) </script >
2. Change the Click to Touchstart (Basic on the mobile side)
1 <script>2 $ (document). On ("Touchstart",function() {console.log (' 22222 ') )})3 </script>
3. Replace the document with the parent element of the selector element
<script> $ (". a"). On (' click ', ". B",function() {console.log (' 22222 ')})</ Script>
4. Foreign articles
<script> $ (selector). Click (function() {console.log (' 1111 ')})</script >
If there are other options, please add
"Go" Issues with on click events failing in iOS