Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Jquery stop auto compleate after list scrolls

Posted on 2014-02-24
3
Medium Priority
?
404 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 2000 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 59

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 59

Expert Comment

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

$(this).blur();

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

705 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