loopj/jquery-tokeninput — Issue #243: Adding tokeninput live to form field created via ajax
Author: imderek
Created: 2012-01-03 19:24:06+00:00
State: open

I have a form in a modal with a field that I would like to use tokeninputs with. I tried binding tokenInput *after* loading the form markup, but it still doesn't seem to work (meaning, no hints appear, etc):

// open modal
$.facebox('<%= escape_javascript(render('practice_types_form')) %>');
// practice type tokens
$("#user_practice_type_tokens").tokenInput("<%= all_practice_types_path %>", {
crossDomain: false,
prePopulate: $("#user_practice_type_tokens").data("pre"),
preventDuplicates: true,
hintText: "Type a Practice Type",
theme: "facebook"
});