Skip to main content

Bug Tracker

Side navigation

#10641 closed bug (invalid)

Opened November 02, 2011 07:05PM UTC

Closed November 02, 2011 07:56PM UTC

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

Attachments (0)
Change History (2)

Changed November 02, 2011 07:16PM UTC by djije comment:1

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() { ... });

}

Changed November 02, 2011 07:56PM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

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

http://forum.jquery.com