Bug Tracker

Ticket #6407: eq0_bug.html

File eq0_bug.html, 1011 bytes (added by simshaun, 12 years ago)

Test case

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5<title>:first bug</title>
6<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
7</head>
8
9<body>
10<script type="text/javascript">
11$(function() {
12        $("p:first").css('background-color', '#00ff00');
13        $("p").eq(0).css('font-weight', 'bold');
14});
15</script>
16<table cellpadding="5" cellspacing="0" border="2">
17        <tfoot>
18                <tr>
19                        <td>
20                                TFOOT:
21                                <p>This paragraph should not be selected, since it is in the table footer. However, since its the first element in the DOM, it gets selected anyway.</p>
22                        </td>
23                </tr>
24        </tfoot>
25        <tbody>
26                <tr>
27                        <td>
28                                TBODY:
29                                <p>I would expect this paragraph to be selected since its displayed first on screen.</p>
30                        </td>
31                </tr>
32        </tbody>
33</table>
34</body>
35</html>