$('option').click(function(){
var index = $('option').index(this) + 1; //index() will return zero
based result so plus 1 here
});
On Jun 9, 8:23 am, "David .Wu" wrote:
> if I have a menu, how to get the position of the option after I select
> one of it?
>
> for example, if I choose
On Jun 9, 11:23 am, "David .Wu" wrote:
> if I have a menu, how to get the position of the option after I select
> one of it?
>
> for example, if I choose b, and the position should b 2.
>
> a
> b
> c
>
Select elements have a (zero indexed) selectedIndex property that
tells you which option i
2 matches
Mail list logo