Bug Tracker

Modify

Ticket #5070 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

parents() not working the same with Firefox 3.5.2

Reported by: rhorn Owned by: john
Priority: minor Milestone: 1.3.2
Component: selector Version: 1.3.2
Keywords: parents Cc:
Blocking: Blocked by:

Description

Not sure if this is related to jQuery or the update, but parents("SELECTOR") no longer finds elements with tag attributes defined across multiple lines.

Example, the following worked for me before the update, but does not work now:

<div class="testParent

secondClass">

<div class="child1"></div>

</div>

<script type="text/javascript">

$('.testChild').parents('.testParent').click(function(){

alert('gets here');

});

</script>

The following does work: <div class="testParent secondClass">

<div class="child1"></div>

</div>

<script type="text/javascript">

$('.testChild').parents('.testParent').click(function(){

alert('gets here');

});

</script>

Change History

comment:1 Changed 4 years ago by rhorn

Not sure if this is related to jQuery or the update, but parents("SELECTOR") no longer finds elements with tag attributes defined across multiple lines.

Example, the following worked for me before the update, but does not work now:

<div class="testParent

secondClass">

<div class="testChild"></div>

</div>

<script type="text/javascript">

$('.testChild').parents('.testParent').click(function(){

alert('gets here');

});

</script>

The following does work: <div class="testParent secondClass">

<div class="testChild"></div>

</div>

<script type="text/javascript">

$('.testChild').parents('.testParent').click(function(){

alert('gets here');

});

</script>

comment:2 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #4761.

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.