There is a class in css file:
ul.tagit li {
/* add this lines */
float: right;
list-style: disc outside none;
}
It will make your tags to right when you try to add in a text box.
Frage
Tag-it is a jquery UI plugin that allows assigning tags from front end, exactly like tags system in stackoverflow. http://aehlke.github.io/tag-it/
https://github.com/aehlke/tag-it/blob/master/README.markdown
In fact, after calling required scripts inside my <head>
, I just put in my code source:
<ul id="myTags">
</ul>
And call the function like this:
<script type="text/javascript">
$(document).ready(function() {
$("#myTags").tagit();
});
</script>
After execution, the final code source is (Let's say I have inserted one tag):
<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>
I have tried to put dir="rtl"
in the jquery script of tag-it inside the input
, also I tried to put dir="rtl"
in <ul>
, but to no avail. I am sure that customizing this plugin so that it makes the input from right to left is beyond my area of knowledge, that's why I am asking you usual help, which is always appreciated.
How can I make the input field of tag-it work from right to left?
Lösung
There is a class in css file:
ul.tagit li {
/* add this lines */
float: right;
list-style: disc outside none;
}
It will make your tags to right when you try to add in a text box.