Side navigation
#7356 closed bug (duplicate)
Opened October 30, 2010 01:46AM UTC
Closed October 31, 2010 04:00AM UTC
Last modified October 31, 2010 04:01AM UTC
.parents() method doesnt select ':first' parent
Reported by: | bixority | Owned by: | bixority |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | unfiled | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
alert() returns 'undefined' in 1.4.3 and correct field value in 1.4.2
without using ", form" everything works fine.
$("a[name='btn_edit'].btn.edit").click(function(event) { event.preventDefault(); var form = $(this).parents('form:first'); alert($("input[name='action']", form).val()); });
Attachments (0)
Change History (5)
Changed October 30, 2010 10:46AM UTC by comment:1
Changed October 31, 2010 12:57AM UTC by comment:2
owner: | → bixority |
---|---|
status: | new → pending |
Please provide a working test case.
Changed October 31, 2010 02:37AM UTC by comment:3
status: | pending → new |
---|
Replying to [comment:1 jitter]:
Please check your posting. Some words/characters seem to be missing in this part of the post >using ", form" As you didn't provide a test case I tried to craft one by reverse engineering your jQuery code. test case But I can't reproduce the described problem under jQuery 1.4.3 in any recent browser. Please add a test case on http://www.jsfiddle.net which reproduces your problem and add information in which browser this happens
My test case: http://www.jsfiddle.net/bixority/U8vcH/
If you will entirely remove listFormListDiv and all its children from HTML - it will work ok.
Changed October 31, 2010 04:00AM UTC by comment:4
resolution: | → duplicate |
---|---|
status: | new → closed |
This doesn’t have anything to do with the .parents
method.
Please check your posting. Some words/characters seem to be missing in this part of the post
>using ", form"
As you didn't provide a test case I tried to craft one by reverse engineering your jQuery code. test case
But I can't reproduce the described problem under jQuery 1.4.3 in any recent browser. Please add a test case on http://www.jsfiddle.net which reproduces your problem and add information in which browser this happens