I think what you're looking for is something like this:

$("#box select").each(function(){
    //"this" is now a select element to do with
    //what you will
    alert(this.selectedIndex);
    //or to get the currently selected value
    alert($(this).val());
});

I don't know of a better way than that.

Hope this helps,

Paul

On 11/1/06, Khurshid MUROD <[EMAIL PROTECTED]> wrote:

Hi,

 

Does anybody know JQuery way of getting selectedIndex of a select

 

In the code below I am getting all [select]s from #box, now I need to figure out what is selectedIndex for those selects.

 

$('#box').filter(':select')

 

Thanks

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to