Tagit-new отдельно от главной ul (tag-it )?

Возможно ли отделить <li class="tagit-new"></li> от основной ul, чтобы использовать в другом div?

Если правильно понимаю, этот кусок кода отвечает за создание поля и li.
this.tagList
                .addClass('tagit')
                // Create the input field.
                .append($('<li class="tagit-new"></li>').append(this.tagInput))
                .click(function(e) {
                    var target = $(e.target);
                    if (target.hasClass('tagit-label')) {
                        var tag = target.closest('.tagit-choice');
                        if (!tag.hasClass('removed')) {
                            that._trigger('onTagClicked', e, {tag: tag, tagLabel: that.tagLabel(tag)});
                        }
                    } else {
                        // Sets the focus() to the input field, if the user
                        // clicks anywhere inside the UL. This is needed
                        // because the input field needs to be of a small size.
                        that.tagInput.focus();
                    }
                });

Вот так оно всё в уже рабочем html tagit.png

P.S. у меня знаний можно сказать "нет" в js, возможно, кто-то уже сталкивался с этим или знает как сделать.
Заранее, спасибо за любой ответ.
  • Вопрос задан
  • 2371 просмотр
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы