Sorry Aaron, I tested your solution on a duplicate version of the code which wasn't being called by the browser when I "tested" it. The function is no longer fired twice when the text is clicked - just once.

However, the problem now, of course, is that if a user simply clicks on the radio button (and there will be many who do that by default given that the label tag is seldom used), the function is not fired at all.

Binding a click function to the radio tag and the label tag separately isn't a solution as the id would have to be the same for both and that's an invalid approach.

Cheers,

Bruce

At 07:36 p.m. 12/01/2007, you wrote:
Hi Aaron,

Your suggested rearrangement of the a tag does not alter the twin firing of the function. The only way to get a single fire is to remove the label tags - and I don't want to do that.

Cheers,

Bruce


At 07:12 p.m. 12/01/2007, you wrote:
On 1/11/07, Bruce MacKay <<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote: <a href='#' class='ltype' id='A1'><input type='radio' id='A' name='iLTID' value='1' /></a>

Why are you wrapping the <input> in an <a>? Shouldn't it be this instead:

<input type='radio' id='A' name='iLTID' value='1' /><label for='A'><a href='#' class='ltype' id='A1'>standard link</a></label>

And anyway, when you click on a <label>, the element it's associated with gets "clicked" on as well (except in Safari, IIRC), meaning that clicking on labels same effect as clicking on the element it's associated with.

--
Aaron Heimlich
Web Developer
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
http://aheimlich.freepgs.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to