$('#m_client_name').typeahead({
source: function (query, process) {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(function() {
return $.get('<?php echo base_url('index.php/transaksi_lain/getClient/'); ?>/'+query, function (data) {
data = jQuery.parseJSON(data);
return process(data.s);
});
}, 500);
},
autoSelect : false,
minLength : 1,
delay : 3
});
<div class="form-group">
<label for="tarif_client" class="control-label col-xs-8 col-md-3 ">Pilih Client</label>
<div class="col-xs-2">
<input class="form-control" type="text" id="m_client_code" name="m_client_code" placeholder="kode client" data-provide="typeahead" disabled="disabled"/>
<input type='hidden' class="form-control" name="m_client_id" id="m_client_id" placeholder="id" value="0"/>
</div>
<div class="col-xs-4">
<input class="form-control" type="text" id="m_client_name" name="m_client_name" placeholder="cari nama client" data-provide="typeahead" required/>
</div>
</div>
Langganan:
Posting Komentar (Atom)
0 Response to "template typehead"
Posting Komentar