[jQuery] Re: $(elem) question

2007-07-02 Thread Rob Desbois
The string "#aller" is called a selector - meaning it selects elements from the DOM. Whilst the ID (#) selector will only ever return at most 1 element, other selectors can return more than 1, for example: $(".my_class") will return all elements with a CSS class of "my_class". The returned ob

[jQuery] Re: $(elem) question

2007-07-02 Thread debussy007
I have everything working now, thank u very much for your kind help. Though I do not understand the array $("#aller")[0] what are in the next indexes $("#aller")[1], $("#aller")[2], ... ? Rob Desbois-2 wrote: > > Hi, the syntax you need for selecting by ID is this: > >> $("#identifier") >>

[jQuery] Re: $(elem) question

2007-07-02 Thread Rob Desbois
Hi, the syntax you need for selecting by ID is this: $("#identifier") so to find the element with ID 'aller' you want: $("#aller") Bear in mind that the $() function does not return a DOM object, it returns a jQuery object. If you want to access a DOM property such as selectedIndex, you