خرید بک لینک

Vote count: 0

I want to achieve this in below mention code need i want to highlight text in auto complete same like pic i added above

<?php 
$query = isset($_GET['query']) ? $_GET['query'] : FALSE;
global $wpdb;
    // escape values passed to db to avoid sql-injection
$depts = $wpdb->get_results( "SELECT * FROM wp_paklog_service WHERE service_name LIKE '".$query."%'" );
$suggestions = array();
$data = array();
foreach($depts as $row) {
        $suggestions[] = $row->service_name;
        $data[] = $row->id;
}
json_encode ($suggestions);
?>
//this is js code 
var obj = <?php echo json_encode($suggestions); ?>;
jQuery(".search-services").autocomplete({
      source: function( request, response ) {
      var matcher = new RegExp( "^" + jQuery.ui.autocomplete.escapeRegex( request.term ), "i" );
      response( jQuery.grep( obj, function( item ){
          return matcher.test( item );

      }) );
  }

asked 1 min ago

برچسب: i want to,i want to see,i want to believe,i want to know,i want to be your lady baby,i want to go home,i want to hold your hand,i want to be ninja,i want to know what love is,i want to break free, نویسنده: استخدام کار تاريخ: سه شنبه 16 شهريور 1395 ساعت: 14:02

صفحه بندی