Skip to main content

Bug Tracker

Side navigation

#7457 closed bug (invalid)

Opened November 10, 2010 02:36PM UTC

Closed November 10, 2010 04:25PM UTC

$("[name]", form.elements) not working

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.4rc
Keywords: Cc:
Blocked by: Blocking:
Description

$("[name]", form.elements) not working-return empty result.

Attachments (0)
Change History (1)

Changed November 10, 2010 04:25PM UTC by SlexAxton comment:1

resolution: → invalid
status: newclosed

You are using the context argument to try to scope your search, but it's not a valid context.

From the docs:

context - A DOM Element, Document, or jQuery to use as context

You are actually passing in an array of elements to the context argument, which doesn't work.

You are likely trying to do a filter of the elements, so you could probably do something like:

$(form.elements).filter('[name]');

I'll mark this as invalid, but we appreciate your decision to try and help the project out though.