Hello, I'm using PhoneJS to build my first mobile app.
So far everything looks good, I have just to understand the logic of this framework.
I'm now 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:
JavaScript$("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:
JavaScript$("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?
Thanks.
Hi Fez,
Would you please reproduce the issue with the attached project?
Hi,
thanks for the reply, I had to wrap the code inside a "document ready" function to make it works properly.
Thanks for your help.
You are always welcome, Fez.