Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(){
- $("#search-box").keyup(function(){
- $.ajax({
- type: "POST",
- url: "autocomplete.php",
- data:'keyword='+$(this).val(),
- beforeSend: function(){
- $("#search-box").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px");
- },
- success: function(data){
- $("#suggesstion-box ").show();
- $("#suggesstion-box").html(data);
- $("#search-box").css("background","#FFF");
- }
- });
- });
- });
- function selectCountry(val) {
- $("#search-id").val(val);
- $("#suggesstion-box").hide();
- }
- function updateSearchBox(el) {
- $("#search-box").val($(el).html());
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement