0

I'm trying to build a list of "posts" (facebook like) where an user can click on them to collapse them.
I'm using this code to perform this task:

$("body").on( "mousedown", ".feeds > li", function() {

    $(this).addClass("active");

} );

The problem is that this code doesn't work.
If I replace .feeds > li with * and I add an alert to the function:

$("body").on( "mousedown", "*", function() {

    alert("mousedown");

} );

The event is fired only if I click on the SlideOut menu, if I click on the rest of the page it is not fired.

What am I doing wrong?

Fez Vrasta
  • 14,110
  • 21
  • 98
  • 160

1 Answers1

0

A similar issue was discussed here

ice9
  • 31
  • 3