/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<input class="q" type="text" id="contenido" name="contenido" onKeyUp="lookup(this.value);"> function lookup(inputString){ if (inputString.lenght==0){ $('#div').hide(); }else{ $.post("rpc_contenido.php", {queryString:""+inputString+""},function(data){ if(data.lenght>4){ $(#div).show(); $('#div2').html(data); }else{ $(?#div').hide(); } }); } }