Comments (7)
That's not an adequate description. You don't even have sample code here.
from jquery-ui-extensions.
Hi Scott,
I didn't know ifI should paste thewhole example code or not.
Here it is:
<!doctype html>
<title>jQuery UI Autocomplete Extension - HTML Option</title><link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.js"></script>
<script src="jquery.ui.autocomplete.html.js"></script>
<script>
$(function() {
$("#autocomplete").autocomplete({
source: [
{
label: "aardvark",
value: "aardvark"
},
{
label: "<b>apple</b>",
value: "apple"
},
{
label: "<i>atom</i>",
value: "atom"
}
],
minLength: "2",
html: true
});
});
</script>
<input id="autocomplete">
from jquery-ui-extensions.
I tried to attach it to the thread but maybe it's not possible.
I then removed the minLength property from my own application code, thinking it would now work fine with the html content, but it did not.
Here is the code I have in my application:
$().ready(function() {
$("#$textFieldId").keyup(function() {
if (!this.value) {
$("#$hiddenFieldId").attr("value", '-1');
$("#$textFieldId").attr("value", '');
}
});
$("#$textFieldId").autocomplete({
source: "$url",
minLength: $minChar,
html: true,
select: function(event, ui) {
if (ui.item) {
$("#$hiddenFieldId").attr("value", ui.item.id);
}
}
});
});
from jquery-ui-extensions.
Why are you using a string for minLength?
from jquery-ui-extensions.
Please provide a usable test case using jsFiddle or jsbin.
from jquery-ui-extensions.
At first I was not, but then tried with a string see if it would help. Will provide a jsFiddle example.
Sent from my iPod
On 22 févr. 2012, at 22:35, Scott González [email protected] wrote:
Why are you using a string for minLength?
Reply to this email directly or view it on GitHub:
#8 (comment)
from jquery-ui-extensions.
Hi Scott
I saved a jsFiddle to notice my mistake.
Hard to believe.. or not, wrong path url to your plugin in my code. It works indeed. Sorry for that.
Steph
Sent from my iPod
On 22 févr. 2012, at 22:37, Scott González [email protected] wrote:
Please provide a usable test case using jsFiddle or jsbin.
Reply to this email directly or view it on GitHub:
#8 (comment)
from jquery-ui-extensions.
Related Issues (15)
- [selectFirst] Deleted chars on quick input HOT 11
- matcher.test( item.label || item.value || item ) is wrong? HOT 2
- Documentation HOT 4
- accentFolding works only with standard array of strings HOT 5
- Autocomplete and HTML in 1.9.0
- Does not work with jQuery UI 1.10 HOT 2
- Why not use the autoFocus options? HOT 5
- Extensions should prolly use widget patching
- Autocomplete (html option): autocomplete search takes into account html tags HOT 2
- making autocomplete match only from the beginning of the words HOT 2
- error: item.eq is not a function HOT 3
- illuminate letters when typing
- autocomplete.selectFirst needs an update for JUI 1.9 HOT 2
- combobox. accentfolding problem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-ui-extensions.