Solved

Jquery stop auto compleate after list scrolls

Posted on 2014-02-24
3
400 Views
Last Modified: 2014-04-04
Hello. I have a jQuery script that auto fills a text box based on an array in a variable.
It seems to work until you have to scroll and select a state that is down below Iowa.
Try to select Texas or a state in that are of the list.
Here is my Forked jsFiddler URL: http://jsfiddle.net/kz2yg/
0
Comment
Question by:semfreak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Murfur earned 500 total points
ID: 39883190
Try a different browser to confirm but are you using Firefox by any chance? And do you have the Firebug extension installed? I ask because have found recently that jQuery functionality goes more than a little nuts if Firebug is installed and you end up chasing ghosts.

I don't see the problem in Safari or Chrome at all, and Firefox does work if I start with Firebug disabled otherwise I see these errors in the Firebug console:

jquery-ui.js (line 146)
TypeError: $.curCSS is not a function
size -= parseFloat( $.curCSS( elem, "padding" + this, true) ) || 0;

jquery-2.1.0.js (line 1429)
Error: Syntax error, unrecognized expression: unsupported pseudo: textEquals
throw new Error( "Syntax error, unrecognized expression: " + msg );
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 39883226
Take your focus: function out.

After you select an item the mouse is hovering over the list for a brief time and the focus is picking up the item that is in that mouse position when the list is at the beginning.

If you click say Utah on the extreme left edge of the lable and immediately move your mouse left you should be able to get Utah to stick.

Remove the focus: function and the problem goes away.
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 39883250
Actually just remove the  following line from focus

$(this).blur();

Open in new window

0

Featured Post

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Building a glossary into your website 9 60
.CSS HTML Help 3 58
jquery change div image on page reload using Jquery 9 59
Check for Numeric Phone Field 14 48
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question