Odd issue with selector caching

Odd issue with selector caching

I've got a simple jqm demo that shows off paging of search results. You can see it here:


If you search for "e" you will get a lot of results. The Prev/Next buttons work fine, but what I'm playing around with is swipe left and right events. I thought it might be cool if you could paginate using swipe events. In my index2.cfm file I added the following simple code:

$(document).ready(function() {

$('#searchPage').live('swipeleft swiperight',function(event){
console.log(event.type);
if (event.type == "swipeleft") {
var prev = $("#prevlink");
if (prev.length) {
var prevurl = $(prev).attr("href");
console.log(prevurl);
}
}
if (event.type == "swiperight") {
var next = $("#nextlink");
if (next.length) {
var nexturl = $(next).attr("href");
console.log(nexturl);
}
}
event.preventDefault();
});
});

As you can see, I'm just logging now, not actually moving the user yet. Anyway, what's weird is that the URLs I'm picking up are being cached. If I swipe right I see the proper next url. But if I click the button to go to the next page and swipe right again, I'm seeing the same URL. 

Hopefully that makes sense. Any idea why?