[jQuery] Re: show/hide based on list selection

2007-10-18 Thread Karl Swedberg
Hi Belinda, As of jQuery 1.2, the "@" symbol is deprecated (unless you're using the XPath plugin). So, pre-1.2, use the "@", and 1.2+, do not use it. The quotes inside the square brackets are optional. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On

[jQuery] Re: show/hide based on list selection

2007-10-18 Thread Belinda M. Giardine
Thanks Karl and Olaf. I got 2 methods to work so I feel ready to do the real code now. Just one question, in the tutorials I saw lines like q("[EMAIL PROTECTED]'sweets']") where what works here is q('select[name=sweets]'). When should the @ and quotes be used and when shouldn't they? Belinda

[jQuery] Re: show/hide based on list selection

2007-10-17 Thread Karl Swedberg
Belinda, you can also use the .change() method on the element if you want (the part you commented out was just fine). Then you can either get the selected option's value like this ... q(this).text() or its text like this ... q(':selected',this).text() As Olaf mentioned, the real problem

[jQuery] Re: show/hide based on list selection

2007-10-17 Thread Olaf Bosch
Belinda M. Giardine schrieb: I have found this question in the archives and set up a test page based on the responses I have found. But for me it is not working, the section is hidden and doesn't reappear no matter what is selected. I have tried several different browsers. The real task is

[jQuery] Re: show/hide based on list selection

2007-10-17 Thread Olaf Bosch
Belinda M. Giardine schrieb: I have found this question in the archives and set up a test page based on the responses I have found. But for me it is not working, the section is hidden and doesn't reappear no matter what is selected. I have tried several different browsers. The real task is