Bug Tracker

Modify

Ticket #4750 (closed bug: worksforme)

Opened 4 years ago

Last modified 3 years ago

selector bug

Reported by: luka8088 Owned by: john
Priority: low Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: removal selector Cc:
Blocking: Blocked by:

Description

$('.abc ~ *').remove();

Not working !?!?

In this example, nothing is removed (tested with firefox 3.0):

<html>

<head>

<title> test </title>

<script type="text/javascript" src="/include/js/jquery.js"></script>

<script type="text/javascript"> /* <![CDATA[ */

$(document).ready(function () {

$('.abc ~ *').remove();

});

/* ]]> */ </script>

</head> <body>

<span class="abc"> a </span> <span> b </span> <span> c </span>

</body>

</html>

Change History

comment:1 Changed 3 years ago by addyosmani

  • Keywords removal selector added
  • Priority changed from major to low
  • Status changed from new to closed
  • Resolution set to worksforme

Testing this with jQuery 1.4.3  Live Test Case it appears to be consistently removing the expected values across all browsers. Please feel free to re-open this ticket if you have additional test cases you can provide. Closing as it works for me for now.

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.