0

저는 jquery ui v1.10.3과 style v1.10.3 라이브러리를 사용하고 있습니다. JQuery와 klibrary 버전이 내 텍스트 상자jquery ui 자동 완성이 결과를 나열하지 않습니다

<input type="text" name="txtCustomer" id="txtCustomer" /> 

입니다 v1.9.1

내가이

$("#txtCustomer").autocomplete({ 
      source: function (request, response) { 
       $.ajax({ 
        url: '/kpanel/handlers/content.aspx?act=getCustomer&d=' + d, 
        dataType: 'json', 
        data: { name: encodeURI(request.term) }, 
        success: function (z) { 
         response($.map(z.Data, function (item) { 
          return { 
           label: item.Name, 
           value: item.Name 
         })); 
        } 
       }); 
      }, 
      select: function (event, ui) { 
       $("#lblType").html(ui.item.TypeName); 
       $("#lblCode").html(ui.item.CustomerCode); 
      }, 
      open: function() { 
       $(this).removeClass("ui-corner-all").addClass("ui-corner-top"); 
      }, 
      close: function() { 
       $(this).removeClass("ui-corner-top").addClass("ui-corner-all"); 
      } 
     }); 

JS가이 내 결과 JSON 데이터

{ 
    "Data": [ 
     { 
      "Name": "Kolya Husten", 
      "CustomerCode": "MT20132645", 
      "TypeName": "Normal", 
      "Email": "[email protected]", 
      "Telephone": "0(234)567-89-45", 
      "MobilePhone": "0(234)567-89-76", 
      "DiscountRatio": "0" 
     }, 
     { 
      "Name": "Loya Mantus", 
      "CustomerCode": "MT20132602", 
      "TypeName": "Normal", 
      "Email": "[email protected]", 
      "Telephone": "0(212)268-02-22", 
      "MobilePhone": "0(536)448-96-67", 
      "DiscountRatio": "10" 
     } 
    ] 
} 

입니다 모든 것이 좋지만 결과는 그림과 같이 표시되지 않습니다.

enter image description here

답변

0

나는이 오류를 발견했습니다. 내있는 style.css 파일에

은 내가이 줄을 때문에 글꼴 크기 속성 결과 목록의

body { background: #fff; color: #393939; font-family: Arial; font-size:0px; line-height: 0; } 

표시되지 않았습니다 있습니다. 나는이 줄을 이렇게 바꿨다.

body { background: #fff; color: #393939; font-family: Arial; line-height: 0; } 

입니다. 어쨌든 고마워,

관련 문제