I have a form, which I want to iterate through. I want to show one fieldset at a time, and then show a "next" and "back" button to go to the next section.
I'm assuming that I start with $('fieldset'); but how do I access individual elements thereafter?
$("fieldset")[i] does not seem to work.
How would I accomplish that with jQuery?
I don't necessarily recommend this, but:
Should work.
If you wrap each call to
$('.fieldset')[i]in a new JQuery selector, you create a new JQuery object out of that single item. JQuery objects have the methodcssthat you want. Regular dom objects do not. (That's what you get with$('.fieldset')[i])