2013-05-30 1 views
1

Tag-it은 stackoverflow의 태그 시스템과 마찬가지로 프런트 엔드에서 태그를 할당 할 수있는 jquery UI 플러그인입니다. http://aehlke.github.io/tag-it/오른쪽에서 왼쪽으로 입력하는 필드 - Tag-it jquery UI 플러그인

https://github.com/aehlke/tag-it/blob/master/README.markdown

사실, 내 <head> 내부에 필요한 스크립트를 호출 한 후, 난 그냥 내 코드 소스에 넣어 :

<ul id="myTags"> 
</ul> 

그리고이 같은 함수를 호출 :

<script type="text/javascript"> 
    $(document).ready(function() { 
     $("#myTags").tagit(); 
    }); 
</script> 

실행 후 최종 코드 소스는 다음과 같습니다 (하나의 태그를 삽입했다고 가정 해 봅시다) :

<ul id="myTags" class="tagit ui-widget ui-widget-content ui-corner-all"> 
    <li class="tagit-choice ui-widget-content ui-state-default ui-corner-all tagit-choice-editable"> 
     <span class="tagit-label">tag1</span> 
     <a class="tagit-close"> 
     <span class="text-icon">×</span> 
     <span class="ui-icon ui-icon-close"></span> 
     </a> 
     <input dir="rtl" type="hidden" style="display:none;" value="tag1" name="tages[]"> 
    </li> 
    <li class="tagit-new"> 
    <input dir="rtl" type="text" class="ui-widget-content ui-autocomplete-input" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"> 
    </li> 
</ul> 

내가의 JQuery와 스크립트에 dir="rtl"를 넣어 시도 태그 그것은 input 내에서, 또한 나는 <ul>dir="rtl"을 넣어 시도했지만 아무 소용. 이 플러그인을 사용자 정의하여 오른쪽에서 왼쪽으로 입력하는 것이 내 지식 영역을 넘어선다는 것을 확신합니다. 그래서 나는 항상 도움을 청하고 있습니다. 항상 도움을 청합니다.

어떻게 태그의 입력 필드를 만들 수 있습니까? 오른쪽에서 왼쪽으로 작동합니까? CSS 파일의 클래스가있다

답변

3

:

ul.tagit li { 
/* add this lines */ 
float: right; 
list-style: disc outside none; 
} 

텍스트 상자에 추가 할 때, 오른쪽에 태그를 만들 것입니다.

+0

이 문제에 신속하게 답변 해 주셔서 감사 드리며, 테스트를 거쳐 피드백을 보내 드리겠습니다. –

+0

나는 html UL id에 따라 css id 클래스 이름을 변경했습니다. 그것을 확인하십시오. – skparwal

+0

시간과 도움을 주셔서 대단히 감사합니다. 행운을 빌어 요. –