hailwood / jQuery-Tagit

The Jquery Tagit Plugin transforms an html unordered list into a unique tagging plugin.
264 stars 109 forks source link

I creat a list by getJSON, but tagit doesn't work on it #97

Open magicneed opened 10 years ago

magicneed commented 10 years ago

I creat the list by: function creattags() { $(document).ready(function() { function creattags(event) { event.preventDefault(); $.getJSON("json/tags.json", function(data) { var html = ''; html +='

' $('#tagwarp1').html(html); })

    }
    creattags(event);
});

} creattags();

My data is: [ {"id": "0", "tags": "t1"},{"id": "1", "tags": "t2"}, {"id": "2", "tags": "t3"} ];

I get the result like this.

Tagit doesn't work on this list creat by tags.json, but it works on the list creat by the data in my js. How can I sholve this problem?