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
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
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
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
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
5 matches
Mail list logo