View Single Post
Old 01-04-2013, 12:58 PM   PM User | #1
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
jQuery mobile swipe event should not work on desktop?

Hello,

So, I have the jQuery mobile swipe working on tablets and phones which is good. But it also fires on the desktop with a mouse swipe. This means that a user cannot highlight text. I thoguth this was something that would only work on mobile devices.

How can I fix this?

Code:
$(document).ready(function(){	  

	var path = getModuleDataUrl();
	$.get(path, function(xmlFile)
		{
			$.ajax({
				type: "GET",
				url: path,
				dataType: "text",
				success: parseXml
			});
	});
	
	$('#containerContainer').live("swipeleft", function(){
		goToNext();
 
	});

	$('#containerContainer').live("swiperight", function(){
		goToPrev();
	 
	 });
	
});
m2244 is offline   Reply With Quote