Bug Tracker

Opened 8 years ago

Closed 8 years ago

#10641 closed bug (invalid)

Click error detection line on a list

Reported by: djije Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Description

I have this list : <ul class="open">

<li class="titreO" id="li1">Equipements <li id="li2" class="action"><a href="myurl1">List</a> <li id="li3" class="action"><a href="myurl2">Search</a> <li id="li4" class="action"><a href="myurl3">Create</a>

</ul>

and Jquery code is :

$(document).ready(function() {

$('li[class="titre"]').click(function() { ... });

}

when I click on a line with the class "action" the program enters into code describe in jquery section and $(this) is the li with the id li1. I tried with id selector, same problem.

Any idea ?

Regards

Change History (2)

comment:1 Changed 8 years ago by djije

Sorry the problem occurs in case of a sub list :

<ul class="open">

<li class="titreO" id="li12">Signalisation

<ul class="open">

<li class="titreO" id="li13">Messages <li id="li14" class="action"><a

href="url1">List</a>

<li id="li15" class="action"><a

href="url2">Search</a>

<li id="li16" class="action"><a

href="url3">Create</a>

</ul>

</ul>

The clic on li14 is detected into the click onto li12 with the jQuery code :

$(document).ready(function() {

$('li[class="titre"]').click(function() { ... });

}

comment:2 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

Can you ask this question on the forum, instead of the bug tracker? Thanks.

http://forum.jquery.com

Note: See TracTickets for help on using tickets.