[thelist] jQuery/Safari Issue

Noah St. Amand noah at tookish.net
Wed Mar 12 18:59:26 CDT 2008


On 12-Mar-08, at 6:52 PM, Noah St. Amand wrote:

> I have a form that hides and reveals fields based on previous
> responses, or if the user manually clicks a hide/reveal button. It
> works exactly the way I want in Firefox and IE, but Safari is doing
> strange things, changing the values of previous fields based on what's
> entered into a field further down the page.

Never mind -- after I spent hours poring over the JS, it turned out  
the problem was badly nested labels in the HTML.

I did learn something that might be of use to someone:

<tip type="jQuery">

When a jQuery "click" event is attached to an element with an  
associated "<label>", a single click will cause the function to be  
called twice.

More information and some workarounds here:

<http://www.nabble.com/label-fires-click-function-twice-td14507150s27240.html 
 >

</tip>

Cheers,
Noah



More information about the thelist mailing list