Solved

Down key next

Posted on 2014-04-23
3
249 Views
Last Modified: 2014-04-23
Good morning,
I'm trying to get my own AutoComplete add-in working, and a bit stuck trying to get down to select the next item in the list.

I belive my issue is that Im setting the autocomplete as a variable, then trying to add on the .selection range, as I keep getting the error message:-

Uncaught TypeError: undefined is not a function (index):29
(anonymous function) (index):29
jQuery.event.dispatch jquery-1.9.1.js:3074
elemData.handle jquery-1.9.1.js:2750

Ive uploaded my code to http://jsfiddle.net/7NU6M/1/ which should select the second 'hello' after you click on the 'Next'.

Im now stuck how to mix the variable and the class selector, any ideas????

Thank you
0
Comment
Question by:tonelm54
  • 2
3 Comments
 
LVL 55

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 40016951
What is your thinking behind this line

var $selElement = newAutoComplete + $(".selected")

Open in new window


What is the plus doing?

What are you trying to achieve.

I suspect you are misusing the + and are probably wanting something like this

var $selElement = newAutoComplete.find(".selected");

Open in new window

0
 

Author Closing Comment

by:tonelm54
ID: 40016983
You suspected right :-) Thank you, that works
0
 
LVL 55

Expert Comment

by:Julian Hansen
ID: 40017031
You are welcome - thanks for the points.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

808 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