[jQuery] How to loop through JSON data

2009-02-21 Thread newkid85
If I have JSON data like this: { "9": { "title": "Event 1", "style": "rock" }, "11": { "title": "Event 2", "style": "pop" }, "15": { "title": "Event 3", "style": "house" }, "16": { "title": "Event 4", "style": "metal"} } How can I loop through each item grabbing each key/value pair for outputtin

[jQuery] Re: How to stop change event from firing

2008-10-24 Thread newkid85
gt; > > $('#field-state').val('idaho') > or > $('#field-state option[value=idaho]').attr('selected','selected') > or > var state = 'idaho'; > $('#field-state').find('option[value='+state >

[jQuery] Re: How to stop change event from firing

2008-10-23 Thread newkid85
is and found a workaround? On Oct 17, 7:10 pm, ricardobeat <[EMAIL PROTECTED]> wrote: > You can do $("#field-state").unbind('change'); when it starts being > edited and bind the function again when it's done, or you can put > everything in the function inside

[jQuery] How to stop change event from firing

2008-10-17 Thread newkid85
I have a form with three dependent location select fields and a text field which lets a user add a new city if it is missing from the dropdown. The following function works fine when I create a new form. It puts the fields in sync to start with and keeps them that way when the user makes their sel