2013-06-21 4 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. टोकन इनपुट कस्टम प्रवेश के लिए काम नहीं कर रहा jQuery टोकन इनपुट में काम नहीं कर रहा है। जैसे ही कर्सर इनपुट से बाहर हो जाता है, इनपुट इनपुट से गायब हो जाएगा। इस समस्या का समाधान किस प्रकार से किया जा सकता है। @Cindrella साथ
+3

https://github.com/loopj/jquery-tokeninput 1.6.1 के लिए अनुमति दें कोशिश करें फ्रीटागिंग: सही विकल्प। – Cindrella

उत्तर

3

टेस्ट:

$("#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

इस प्रयास करें:

$("#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: सच है जब आप आरंभ करें।

संबंधित मुद्दे