I'm attempting to create a list using jQueryMobile similar to the one found in the Twitter application.
Here's a video demonstrating what I'm aiming for: http://www.youtube.com/watch?v=l7gTNpPTChM
However, I am facing two issues:
1) Each row is assigned the class .mailRow and the .live("tap") event functions correctly. However, the .live("swipe") event does not work on mobile devices but works on computers when triggered with the right mouse button.
2) I have successfully "hidden" the row using the following code:
$('.mailRow').live('swipe', function(e){
$(this).animate({ marginLeft: "100%"} , 800);
});
But I am unsure of how to add another div underneath so it becomes visible once the animation completes.
Below is the HTML structure of the list elements:
<li data-theme="c" class="ui-btn ui-btn-icon-right ui-li ui-btn-up-c">
<div id="12345" class="mailRow" style="margin-left: 100%; ">
<div class="ui-btn-inner ui-li"><div class="ui-btn-text">
<a href="" class="ui-link-inherit">
<p class="ui-li-aside ui-li-desc"><strong>30/09/2011 11:09:34</strong></p>
<h3 class="ui-li-heading">USER1</h3>
<p class="ui-li-desc"><strong>Re: this is a test</strong></p>
<p class="ui-li-desc">TESTING THE MOBILE VERSION...</p>
</a>
</div><span class="ui-icon ui-icon-arrow-r ui-icon-shadow"></span></div>
</div>
</li>
UPDATE: Upon further investigation, I discovered that the swipe event is not functioning due to the presence of an "a" tag inside the div. I am currently exploring a solution to rectify this issue.