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
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 object
2 matches
Mail list logo