The click of the mobile side is delayed, and this effect does not see the delay, why?
Page:
<div id= "Container" style= "width:200px" >
<p id= "Write" ></p>
<ul id= "Keyboard" >
<li>1</li>
<li>2</li>
<li class= "Delete" >delete</li>
</ul>
</div>
<script type= "Text/javascript" src= "Js/jquery.min.js" ></script>
<script type= "Text/javascript" src= "Js/jianpan.js" ></script>
Js:
$ (function () {
var $write = $ (' #write ');
$ (' #keyboard li '). Click (function () {
var $this = $ (this),
character = $this. html (); If it ' s a lowercase letter, nothing happens to this variable
Delete
if ($this. Hasclass (' delete ')) {
var html = $write. HTML ();
$write. HTML (html.substr (0, html.length-1));
return false;
}
Special characters
if ($this. Hasclass (' return ')) character = "\ n";
Add the character
$write. HTML ($write. HTML () + character);
});
});
His little front end (1)--Mobile special effects-web keypad