$(".is_preferred_email").each(function() {
$(this).attr("checked","checked");
});
On Oct 6, 8:14 pm, Dave Methvin <[EMAIL PROTECTED]> wrote:
> > Actually, I tried both of those things first - should have mentioned
> > that. It was only after I got three elements doing
> > alert($j(".is_preferred
> Actually, I tried both of those things first - should have mentioned
> that. It was only after I got three elements doing
> alert($j(".is_preferred_email")) that I switched to using the index.
Looking at your markup, it seems like it should return three elements.
I don't see a problem there.
As for yout ".size()" issue
this code
http://paste.pocoo.org/show/87223/
works totally as expected. not sure what you have different
On Oct 6, 10:41 am, BB <[EMAIL PROTECTED]> wrote:
> Try:
> $j(".is_preferred_email").each(
> function(i) {
> this.chec
Try:
$j(".is_preferred_email").each(
function(i) {
this.checked = false;
}
);
or as the posts before:
$j(".is_preferred_email").attr("checked", false);
On 6 Okt., 16:04, sydneyos <[EMAIL PROTECTED]> wrote:
> Thanks for your input. Here is
Thanks for your input. Here is the relevant HTML (dynamically
generated)
On Oct 5, 7:22 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> There is absolutely no way you have the selector setup correctly
>
> what is the HTML?
>
> On Oct 5, 8:53 pm, sydneyos <[EMAIL PROTECTED]> wrote:
>
> > I ha
Dave,
Actually, I tried both of those things first - should have mentioned
that. It was only after I got three elements doing
alert($j(".is_preferred_email")) that I switched to using the index.
On Oct 5, 7:53 pm, Dave Methvin <[EMAIL PROTECTED]> wrote:
> > $j(".is_preferred_email").eac
> $j(".is_preferred_email").each(
> function(i) {
> this[i].checked = false;
> }
> );
Inside the function of each(), the first arg is the index in the
array. The "this" is the actual DOM element. It looks like you thought
it was the original
There is absolutely no way you have the selector setup correctly
what is the HTML?
On Oct 5, 8:53 pm, sydneyos <[EMAIL PROTECTED]> wrote:
> I have the following expression where is_preferred_email is a class
> assigned to three elements in my page:
>
> $j(".is_preferred_email").each(
>
8 matches
Mail list logo