Solved

Down key next

Posted on 2014-04-23
3
242 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 51

Accepted Solution

by:
Julian Hansen earned 500 total points
Comment Utility
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
Comment Utility
You suspected right :-) Thank you, that works
0
 
LVL 51

Expert Comment

by:Julian Hansen
Comment Utility
You are welcome - thanks for the points.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jquery, html5 UI 1 47
Table append 4 22
Angular - (very close) following an example 20 32
gif overlay 3 32
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now