Swipe from jquerymobile does not work in VisualForce?
I tried swipe from jquerymobile in HTML and Javascript, it is working fine. As below
[removed][removed] [removed][removed] [removed] $(document).ready(function(){ $("#home").swipeleft(function(){ $.mobile.changePage("#page1"); }); }); [removed]
But I tried the same thing in VisualForce, it does not work. As below:
I used same version of CSS,JS. It just does not work. I do not know if it is VisualForce's problem or my code's problem? Why jquery mobile swiper not working?
jquery mobile swiper is an event triggered when the user press down and swipes over an element horizontally by more than 30px (and less than 75px vertically). Tip: You can swipe in both right and left directions. Related events: swipe left - triggered when the user swipes over an element in the left direction.
You can try using jQuery's noConflict() method, collisions with the $ often cause issues:
var jq = jQuery.noConflict(); jq(document).ready(function(){ jq("#mainpage").swipeleft(function(){ jq.mobile.changePage("#page1"); }); });
Other than that, check the javascript console for any errors and also ensure that all the resources are being loaded correctly (try the net tab in Chrome debugger / Firebug).
Hope this resolves your issue.