Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I set the width for a text area attached by the autoSuggest plug-in for jQuery?
    primarykey
    data
    text
    <p>I found a great plug-in for doing Auto-Complete with Javascript called AutoSuggest thanks to this Stack Overflow post:</p> <p><a href="https://stackoverflow.com/questions/5031162/plugin-to-separate-tags-like-the-stackoverflows-input-tags-interface">plugin to separate tags (like the stackoverflow&#39;s input tags interface)</a></p> <p>Here is the link to the plug-in author's page:</p> <p><a href="http://code.drewwilson.com/entry/autosuggest-jquery-plugin" rel="nofollow noreferrer">http://code.drewwilson.com/entry/autosuggest-jquery-plugin</a></p> <p>The autoSuggest plug-in is setting the width of the <strong>input</strong> box (type="text") for entering queries to 1000px, much wider than I want. It is somehow overridding the width set in the input box style property in the document HTML:</p> <pre><code>&lt;div NAME="divAutoSuggest" ID="divAutoSuggest"&gt; &lt;input type="text" NAME="editQuery2" ID="editQuery2" wrap="soft" style="margin-left:5px;width:600px;" title="Enter your search query here using plain English"&gt;&lt;/input&gt; &lt;/div&gt; </code></pre> <p>I also tried using the <em>cols</em> attribute in the input box definition but that was ignored too. I found this other Stack Overflow post that talked about intercepting the width setting during the <em>open</em> event, but the example was for the <em>autocomplete</em> plug-in and not autoSuggest:</p> <p><a href="https://stackoverflow.com/questions/4607164/changing-width-of-jqueryui-autocomplete-widgets-individually">Changing width of jquery-ui autocomplete widgets individually</a></p> <p>I tried it anyways using this code:</p> <pre><code>$(document).ready ( function() { // Put jQuery related initialization code that must occur after the document is ready here. $("input[type=text]").autoSuggest ( data.items, { selectedItemProp: "name", searchObjProps: "name", startText: "Enter Evernote tags here...", open: function(event, ui) { $(this).autoSuggest("widget").css ( { "width": 600 } ); } } // data. items ); // $("input[type=text]").autoSuggest } // function() ); // $(document).ready </code></pre> <p>But that did not work either. can anyone tell me how to set the width of the input box? Note I am not talking about the drop-down box with the auto-complete entries, I am referring to the primary input area where you type the text that triggers the auto-complete drop-down box.</p>
    singulars
    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