Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- $("#city_search").keyup(function(){
- var _this = this;
- var l = _this.value.length
- $.each($(".city_ul_list a"), function() {
- var part_len = $(this).text().toLowerCase().split('').slice(0,l).join('');
- if(part_len !== _this.value.toLowerCase()) {
- $(this).parent().hide();
- } else {
- $(this).parent().show();
- }
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement