Solved

Down key next

Posted on 2014-04-23
3
261 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
[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 58

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 58

Expert Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have answered several questions lately that were solved utilizing the power of jQuery's AJAX functions, so I thought I would write an article demonstrating the ease of use. Why should I use jQuery as opposed to regular JavaScript? Now I know…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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)

630 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