Search code examples
jquerymouseeventphonejs

Bind "mousedown" on PhoneJS


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?


Solution

  • A similar issue was discussed here