I have a problem with the click function on a mobile web page. Here is my html code
<div data-role=content> <input type="text" id="text"> <div id="ss"></div> </div> <script type="javascript"> $(document).ready(function() { $("#text").keyup(function(){ $('#ss').append('<div style="background:yellow;" >Text<br/><a class="te"> alert </a></div>'); }); $(".te").click(function(){ alert("It is working"); }); }); </script>
Please help me solve this problem.
source share