Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery UI autocomplete and tag plugin (XOXCO) merging issue
    primarykey
    data
    text
    <p>I have been using jquery autocomplete for a while with no problems until now. I want to create a tag system (such as the one in stackoverflow).</p> <p>For this I am using two plugins:</p> <ul> <li><strong>Jquery UI</strong> (http://jqueryui.com/demos/autocomplete/)</li> <li><strong>Xoxco</strong> (http://xoxco.com/projects/code/tagsinput/)</li> </ul> <p>I have it running and working using this code:</p> <pre><code>$('#related_tags').tagsInput({ autocomplete_url : 'live_search.php', autocomplete : { minLength: 3, delay: 150, //DATA AS OPTION?? }, 'height':'30px', 'width':'auto', 'removeWithBackspace' : true, 'minChars' : 3, 'maxChars' : 200, 'placeholderColor' : '#666666' }); </code></pre> <p>However, I need to change the way livesearch displays the data found (so that it doesn't only display the label). If you are not using these two plugins together (say you just use autocomplete) it's easy, you just do something like this:</p> <pre><code>$( "#related_tags" ).autocomplete({ source: 'live_search.php', minLength: 3, delay: 150 }) .data( "autocomplete" )._renderItem = function( ul, item ) { return $( "&lt;li&gt;&lt;/li&gt;" ) .data( "item.autocomplete", item ) .append( "&lt;a href='item.php'&gt;" + item.label + " " + item.surname + "&lt;span style='color:#003399;'&gt;" + item.p_name + "&lt;/span&gt;&lt;/a&gt;" ) .appendTo(ul); }; </code></pre> <p>As you can see, I am not displaying just the item's label, I am also displaying the surname and the p_name.</p> <p>So my question is: </p> <hr> <p><strong>How do you use the data rendering function when mergin the autocomplete and the tags plugins together?</strong></p> <hr> <p>Since I believe data is not available as an autocomplete option I can't just push it up tere. Any ideas?</p> <p><em>P.S: If you do know how to do this using a different plugin than xoxco please tell me anyway. Thanks!</em></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload