2012-12-20 4 views
1

내 프로젝트에서 jQuery UI 자동 완성 콤보 박스를 사용하고 있습니다. 이 위젯 또는 플러그인은 페이지의 '고정 바닥 글'에 배치됩니다. 이것은 잘 작동합니다. 자동 완성 콤보 박스는 바닥 글 스트립에 있으므로 자동 완성 드롭 다운 메뉴가 열리면 페이지 밖으로 이동합니다.jQuery ui 자동 완성 콤보 상자 드롭 다운 위치

나는이 드롭 다운 메뉴는 입력 필드 대신 입력 필드의 하단의 상단에 표시되어야 할 스크린 샷 http://prntscr.com/mpa11

를 참조하십시오.

어떤 제안을 해주시겠습니까?

답변

3

그럼 아무도 대답하지는 않지만이 문제를 해결했습니다. 방금 콤보 상자의 소스 파일에 position 속성을 추가하고이 문제를 해결했습니다.

    position: { 
         my: "left top", 
         at: "left bottom", 
         collision: "fit flip" 
        } 
1

완벽한 덕분에 나에게 도움이되었습니다. 위치를 조금 더 명확하게하기 위해 위치는 자동 완성을위한 매개 변수입니다.

this.input = $("<input>") 
    .insertAfter(this.element) 
     .val(value) 
     .attr("title", "") 
     .addClass("custom-combobox-input") 
     .autocomplete({ 
      position:{ 
      collision:"fit flip" 
      }, 
     delay: 0, 
     minLength: 0, 
      select:function(event,ui){ 
      this.value = ui.item.value; 
      if(that.options.script){ 
         that.options.script(); 
        } 
      $(this).blur(); 
      },search:function(event,ui){ 
      if(event.originalEvent){ 
          if(that.options.script){ 
          that.options.script(); 
         } 
        } 
         }, 
     source: this.options.source?this.options.source:[] 
     }).focus(function(){ 
      $(this).autocomplete("search", ""); 
     }) 
     .tooltip({ 
     tooltipClass: "ui-state-highlight" 
     }); 
관련 문제