senchalabs/jQTouch — Issue #363: AJAX and .swipe Functions
Author: jonlabass
Created: 2012-01-06 16:33:08+00:00
State: open

With b4rc the swipe() functions (swipe, swipeLeft, swipeRight) do not work on list items that have been added via AJAX. Here's how to reproduce it with the code from the download link:

1. Create demos/main/ajax_test.php with the following content:

Swipe me!

2. Modify the callbacks div from demos/main/index.html to the following (only adding a swipetest div):

Events

Home

Orientation: portrait

Page events

Swipe me!

Tap me!

3. Add the following javascript code:

var url	= 'ajax_test.php';
$.get(url, function(data) {
$('#swipetest').html(data).show();
},'html');
4. Now when you test, you will see the swipeme loaded from AJAX does not trigger the swipe function.