index « jQuery « JavaScript DHTML






1.Get index among query
2.On click, returns the index (based zero) of that div in the page.
3.Returns the index for the element with ID foobar.
4.Returns the index for the element with ID foo within another element.
5.Returns -1, as there is no element with ID bar.
6.Use switch to check the clicked button