2013-06-21 21 views
5
$("#responsible").tokenInput(
      [ 
       {id: 7, name: "[email protected]"}, 
       {id: 11, name: "[email protected]"}, 
       {id: 13, name: "[email protected]"}, 
       {id: 17, name: "[email protected]"}, 
       {id: 19, name: "[email protected]"}, 
       {id: 23, name: "[email protected]"}, 
       {id: 29, name: "[email protected]"}, 
       {id: 31, name: "[email protected]"} 
      ],{ 
       prePopulate: respArray, 
       hintText: "Enter mailid", 
       allowCustomEntry: true, 
       theme : "facebook", 
       noResultsText: "O noes", 
       searchingText: "Searching...", 
       minChars: 1, 
       tokenLimit: 1, 
       tokenValue: "name", 
       preventDuplicates: true 
      } 
); 
  1. Jetonu giriş özel giriş için çalışmıyor eklentisi jQuery Jetonu girişinde çalışmıyor. İmleç girişten çıktığında, girişten metin kaybolur. Bu sorunu nasıl çözebilirim. @Cindrella ile
+3

https://github.com/loopj/jquery-tokeninput için 1.6.1 versio deneyin allowFreeTagging: true option. – Cindrella

cevap

3

Testi:

$("#responsible").tokenInput(
     [ 
      {id: 7, name: "[email protected]"}, 
      {id: 11, name: "[email protected]"}, 
      {id: 13, name: "[email protected]"}, 
      {id: 17, name: "[email protected]"}, 
      {id: 19, name: "[email protected]"}, 
      {id: 23, name: "[email protected]"}, 
      {id: 29, name: "[email protected]"}, 
      {id: 31, name: "[email protected]"} 
     ],{ 
      prePopulate: respArray, 
      hintText: "Enter mailid", 
      allowCustomEntry: true, 
      theme : "facebook", 
      noResultsText: "O noes", 
      searchingText: "Searching...", 
      minChars: 1, 
      tokenLimit: 1, 
      tokenValue: "name", 
      allowFreeTagging: false, // !ADD THIS ! 
      preventDuplicates: true 
     } 
); 
0

bu deneyin:

$("#responsible").tokenInput(
    [ 
    {id: 7, name: "[email protected]"}, 
    {id: 11, name: "[email protected]"}, 
    {id: 13, name: "[email protected]"}, 
    {id: 17, name: "[email protected]"}, 
    {id: 19, name: "[email protected]"}, 
    {id: 23, name: "[email protected]"}, 
    {id: 29, name: "[email protected]"}, 
    {id: 31, name: "[email protected]"} 
    ],{ 
    prePopulate: respArray, 
    hintText: "Enter mailid", 
    allowFreeTagging: true, 
    theme : "facebook", 
    noResultsText: "O noes", 
    searchingText: "Searching...", 
    minChars: 1, 
    tokenLimit: 1, 
    tokenValue: "name", 
    preventDuplicates: true 
} 
); 

allowFreeTagging ekleyin: true başlattığınız zaman.

İlgili konular