Get index of an elementBack
1. What is index()
This is a function which displays the position of an element on page.
After ready your document you will have to run a click function.
var li_location = $(this).index();
"var li_lication" will hold the position value of li and "$("#result span")" will show the position output.
This will be much helpful in creating tabs and sliders.
How to comment:
- Create an account in discuss by clicking on login next to arrow.
- Create password for discuss and varify your email id, through your mail.
- Refresh page and comment.
You might also like
Css3 piano card navigation
CSS3 transform and transition animation
Tab 2 accordion responsive plugin
Plugin that changes tabs to accordion
Master checkbox control
A master checkbox which controls all checkbox.