1
我有一個模式,通過點擊頁面上的任何一個圖像,我有一個輸入字段,我試圖應用bootstrap-tagsinput啓動。Bootstrap標籤輸入不與延遲加載
$(document).on("click","a.lazy",function(){
$("#form").find(".title").attr('value',$(this).find(".title").val());
$("#form").find(".title").attr('data-role','tagsinput');
$("#form").modal("show");
});
我分配值和數據的作用與lazyload屬性下列輸入字段:
<div class="input-group">
<span class="input-group-addon">Tags</span>
<input type="text" class="form-control title" placeholder="Enter Tags for the Image" name="title">
</div>
一旦我啓動模式,我可以看到的是,屬性是存在,但標籤不應用。我究竟做錯了什麼?
<input type="text" class="form-control title" placeholder="Enter Tags for the Image" name="title" value="yellow" data-role="tagsinput">
這工作,謝謝! – Anon 2014-09-04 00:51:17