jquery-ui-autocomplete

Autocomplete requires you to click twice in iOS after update to 1.11.0

假装没事ソ 提交于 2019-12-17 08:46:08
问题 Using jQuery 2.1.0 and jQuery.ui 1.11.0 Tested in iOS 7. iPhone and iPad Mini. Works on android and regular browsers. The problem We recently upgraded from jQuery UI 1.10.0 to 1.11.0 and now, when clicking an item in an autocomplete results list, you only get a hover, you have to click the same element again to get a click event. This used to work fine with version 1.10.0. (JSFiddle link in comments) What does not work using css {cursor: pointer} does not work using onclick="" does not work

Limit results in jQuery UI Autocomplete

╄→гoц情女王★ 提交于 2019-12-17 02:04:55
问题 I am using jQuery UI Autocomplete. $("#task").autocomplete({ max:10, minLength:3, source: myarray }); The max parameter doesn't work and I still get more than 10 results. Am I missing something? 回答1: Here is the proper documentation for the jQueryUI widget. There isn't a built-in parameter for limiting max results, but you can accomplish it easily: $("#auto").autocomplete({ source: function(request, response) { var results = $.ui.autocomplete.filter(myarray, request.term); response(results

How can I custom-format the Autocomplete plug-in results?

China☆狼群 提交于 2019-12-16 20:14:42
问题 I’m using the jQuery UI Autocomplete plug-in. Is there a way to highlight search character sequence in drop-down results? For example, if I have “foo bar” as data and I type "foo" I’ll get “ foo bar” in the drop-down, like this: 回答1: Yes, you can if you monkey-patch autocomplete. In the autocomplete widget included in v1.8rc3 of jQuery UI, the popup of suggestions is created in the _renderMenu function of the autocomplete widget. This function is defined like this: _renderMenu: function( ul,

jQuery's autocomplete : customize behavior of “ESCAPE” key press

跟風遠走 提交于 2019-12-14 03:58:49
问题 I am using jQuery's autocomplete plugin and want to customize the behavior when user press the "ESCAPE" key as below, when user types text to search, its corresponding results are listed. Without selection any result if "ESCAPE" key is pressed, then the search text entered should be removed. [Default Behavior: the search text is retained] In http://jqueryui.com/demos/autocomplete/#multiple-remote, user can search multiple times. Assume, he has entered a text and has selected a row from the

jQuery UI Autocomplete shows displays on a list the results but when select, prints the value and not the label

狂风中的少年 提交于 2019-12-14 02:03:23
问题 I am having a lot of problems getting autocomplete working. First I've a validation incompatibility because I was using jQuery Validation and jQuery 1.5 and was breaking the AJAX functions on Autocomplete widget. This has been solved, now my PHP controller returns me a JSON of results with label/value. Of course, label is the name I want to show and the value is the value I need to submit. I am using an example JSON output with PHP, only for testing and not for searching right now. This is

How to return both an “id” and “text”

我是研究僧i 提交于 2019-12-13 19:53:05
问题 I am using AutoComplete to search by name. I'm able to output the names, but after submitting the form, I would like to pass the emp_id value, not the fullname . How can I modify it to get the emp_id value, not the fullname ? I would like it after I submit the form I get the emp_id not the fullname value. search_employee.cfc <cfcomponent> <cffunction name="queryNames" access="remote"> <cfargument name="searchPhrase" /> <cfquery name="query_names" datasource=""> SELECT fullname ,emp_id .... <

jQuery multiple autocomplete with different input IDs

吃可爱长大的小学妹 提交于 2019-12-13 17:22:15
问题 I use jQuery autocomplete and have multiple input fields with different IDs, and they are populated from a MySQL database. $("#CCU1").autocomplete({ minLength : 1, source: function( request, response ) { $.ajax({ url:"<?php echo site_url().'gsimc/autocomplete'; ?>", dataType: 'json', data: { term : $("#CCU1").val(), column: 'course', tbl : 'tbl_courses' }, success: function(data){ if(data.response == 'true') { response(data.message); } } }); } }); The input fields has IDs of CCU1...CCU5, name

JQuery Autocomplete does not show all the results

允我心安 提交于 2019-12-13 08:10:59
问题 I am facing the below issue all day and would appreciate any advice. I am writing JQuery autocomplete and it shows only partial results but not all the results from arraylist. When I debug in customFilter function, I see array contains expected string in each row and term has the correct input data from textbox. function customFilter(array, terms) { arrayOfTerms = terms.split(" "); var term = $.map(arrayOfTerms, function (tm) { return $.ui.autocomplete.escapeRegex(tm); }).join('|'); var

jQuery UI autocomplete filter data

限于喜欢 提交于 2019-12-13 04:47:15
问题 I am new to jquery and I was assigned to filter out the list once the item is already selected. There are 3 textboxes that uses the autocomplete. source: apple, orange, mango textbox 1 = apple textbox 2 = apple should be filtered out in the list. it should only display orange and mango. I was able to filter the source but the list still display the item. But the source gets updated once I refresh the page. I have found this question, here's a link but in my case instead of adding, i wanted to

jquery ui autocomplete id and close event ui parameter

a 夏天 提交于 2019-12-13 02:22:33
问题 I am using jQuery Ui Autocomplete 1.8.14 and I would like to do two things: Assign an id to the autocomplete. For instance, I might have many autocompletes on page and I'd need a way to identify each. In particular, in the background autocomplete is generating something like <ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; top: 444px; left: 48px; display: block; width: 118px;"> What I