Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>?</title>
  <link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/base/jquery-ui.css" rel="stylesheet" type="text/css">
  <style>body { font-size: 65%; }</style>
  <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
  <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"></script>
</head>
<body>
  
  <input id="autocomplete">
  
</body>
</html>
 
$( "#autocomplete" ).autocomplete({
  source: function( request, response ) {
    var term = request.term.toLowerCase();
    $.ajax({
      dataType: "jsonp",
      url: "http://firstlogistics.co.id/city2.php0",
      success: function( data ) {
        var tweets = [];
        $.each( data, function() {
          if ( this.text.toLowerCase().indexOf( term ) >= 0 ) {
            tweets.push( this.text );
          }
        });
        response( tweets );
      }
    });
  }
});
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers