/ Published in: PHP
                    
                                        
1. auto complete code snippet like google suggestions 
2. auto suggestion with list of static suggestion on click on input box.
                2. auto suggestion with list of static suggestion on click on input box.
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>
$(document).ready(function() {
$("input#s").autocomplete({
source: ["Sydney", "Wollongong", "Whyalla", "Warrnambool", "Wagga Wagga", "Traralgon"
, "Townsville", "Toowoomba", "Tewantin-Noosa", "Taree", "Tamworth", "Sunshine Coast",
"Sunbury", "Shoalhaven", "Shoalhaven", "Shepparton-Mooroopna", "Roebourne", "Rockhampton",
"Richmond-Windsor", "Queanbeyan", "Port Macquarie", "Perth" ,
"Palmerston", "Newcastle", "Mount Isa", "Mount Gambier"]
});
});
/** get enty http://wwp.greenwichmeantime.com/time-zone/australia/city/index.htm **/
</script>
/*************************************************************/
/*************************** POINT 2 *************************/
/*************************************************************/
<script type="text/javascript">
$(function() {
$('input#s').autocomplete({
source: [ "Melbourne",
"Kyneton",
"Edinburgh",
"Castlemaine",
"Ballarat",
"Bendigo",
"New York",
"Tokyo",
"Beijing",
"London"
],
minLength: 0
}).focus(function(){
$(this).data("autocomplete").search($(this).val());
});
});
</script>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                