#7356 closed bug (duplicate)
.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()); });
Change History (5)
comment:1 follow-up: 3 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | set to bixority |
---|---|
Status: | new → pending |
Please provide a working test case.
comment:3 Changed 13 years ago by
Status: | pending → new |
---|
Replying to 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.
comment:4 Changed 13 years ago by
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
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