ok, let me understand you clearly.
you want to change every option tag within a select to be a specific value ?
if the method you mentioned above does not work try this :
var obj = $(.myclass); // use jquery to select your SELECT by class
var opts = $(option, obj); // find all option tags within that select
opts.each(function(i) { // for each option tag - declare i for counting
opts.eq(i).attr({ // change the current options attribute
value:'my new value' // change the value attribute
});
});
On Mon, Oct 19, 2009 at 12:47 PM, Morris Li morris...@gmail.com wrote:
Hi All
I am having a question and seeking some help from the group.
What I want to do? - to set the SELECTS that match the citerias to be
defaul option.
1: $(select[name^='start_me_']).val(0);
2: $(select[name^='start_me_']).each(function() { this.value =
0; });
I found 1 doesn't work in IE but FF. Could someone let me konw why?
And what's the difference between them?
Many thanks
Morris Li