Bug Tracker

Modify

Ticket #4023 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

"+" combinator and ":visible" misbehaving?

Reported by: jsycamore Owned by: john
Priority: minor Milestone: 1.3.2
Component: selector Version: 1.3.1
Keywords: :visible + Cc:
Blocking: Blocked by:

Description

In the following sample code, the result should be that only "section 3" has a yellow background, red border & blue text. But for IE and Firefox that's not the case. Chrome gets the "+" right, but overselects with the ":visible".

<html> <head> <script type='text/javascript' src="jquery.js"></script> <script type='text/javascript'>

$(function(){

$("div.t+div").css("background","yellow"); $("div.t").find("+div").css("border", "1pt solid red"); $("div.t+div:visible").css("color","blue");

});

</script> </head> <body>

<div>First section</div> <div class=t>Second section</div> <div>Third section</div>

</body>

Change History

comment:1 Changed 4 years ago by dmethvin

  • Owner set to john
  • Component changed from core to selector

comment:2 Changed 4 years ago by john

  • Status changed from new to closed
  • Version changed from 1.3 to 1.3.1
  • Resolution set to fixed
  • Milestone changed from 1.3 to 1.3.2

Fixed in SVN rev [6209].

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.