Opened 13 years ago
Closed 13 years ago
#6653 closed bug (worksforme)
element selector of v1.4.2 found extra (none-exist) elements in firefox v3.6.3
Reported by: | koqiui | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.2 | |
Component: | selector | Version: | 1.4.2 |
Keywords: | found extra elements | Cc: | |
Blocked by: | Blocking: |
Description
Given the following code:
<button>
echo selector result
</button> <div>
DIV1
</div> <div>
DIV2
</div> <span>SPAN</span>
<script language="JavaScript" type="text/javascript">
$(function(){
------------ $("button").click(function(){
alert($("div").length); $("div").each(function(i, elem){
alert((i + 1) + " - " + $(this).text());
});
}); ------------
});
</script>
the result of found elements count is 3 in FF (works ok in IE : count is 2).
Attachments (2)
Change History (3)
Changed 13 years ago by
Attachment: | Capture-6653.PNG added |
---|
comment:1 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
This seems to be an artifact of Firebug, which seems to be injecting a div into the DOM. See the attached test case and screen shot.
Screen shot of Firebug showing div