I'm not so sure the blanket statement ":visible doesn't work in
Opera", as Opera 10 runs the jQuery Docs example just fine:

http://docs.jquery.com/Selectors/visible

Works fine for me anyways....

perhaps it's not selecting what you think it should be?   and FF/
Chrome/IE compensate for it


On Dec 30, 10:01 am, phatfish <phatf...@gmail.com> wrote:
> Hi all,
>
> Im using this code --
>
> var uri = "/generator/render?s=form&o=image&"+$("#main-
> form :visible").serialize();
>
> -- to select and then serialize only the visible fields in a form (i
> have hidden inputs i don't want sent in this ajax request). However
> Opera v10.10 it appears doesn't support the :visible selector (at
> least in jQuery) and gives the error "Unknown pseudo class" relating
> to the :visible selector.
>
> The value of the "uri" variable ends up with duplicate fields in the
> serialized string, messing up the request data. Caused it seems, by it
> not liking that selector.
>
> The code works fine in Firefox/Chrome/IE but not Opera. If i remove
> ":visible" and just use "#main-form" as the selector, it serializes
> the form correctly. So i'm sure the selector is the problem.
>
> If anyone knows an alternative way to make the selection so hidden
> fields aren't selected, that will work with Opera as well as the other
> browsers mentioned, that would be helpful.
>
> Thanks!

Reply via email to