0
<link rel="stylesheet" href="/javascript/jquery-ui-1.9.2.custom/css/smoothness/jquery-ui-1.9.2.custom.css" />
<script src="/javascript/jquery.mobile-1.4.2/jquery.mobile-1.4.2.js"></script>
<script src="/javascript/jquery-1.8.2.js"></script>
<script src="/javascript/jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.js"></script>
<script src="/javascript/jquery.easing.1.3.js"></script>

Above are my includes statement for jquery. I have the same event listeners for touchstart and swipeleft. Somehow touchstart works, but a simple alert() in swipeleft fail. Any reason ?

var slides = $('#latestEventSection');    
slides.on('swipeleft', function(e) {
  alert("swipeleft");
});
slides.on('swiperight', function(e) {
  alert("swiperight");
});
Tamil Selvan C
  • 19,913
  • 12
  • 49
  • 70
Fxster
  • 189
  • 1
  • 4
  • 13
  • Are you getting an error in the console? – VVV Mar 26 '14 at 02:37
  • hi, no errors. i just need to change swipeleft to touchstart. the alert() will work – Fxster Mar 26 '14 at 02:41
  • Ok. My guess (and I may be wrong) is because touchstart is native in most common browsers. Swipeleft isn't. That's why the first one is working but not the second one. Try putting the jquery mobile after loading jquery. – VVV Mar 26 '14 at 02:45
  • I have tried placing jquery mobile after jquery , somehow it will generates lots of error ... is this normal ? therefore i placed it before now... anyway... is it firm that once I have jquery mobile, i should be able to run swipeleft? Any other prerequisite? – Fxster Mar 26 '14 at 05:29
  • JQM should be placed after jquery. I guess there's a conflict between JQM and jq-ui. Use jquery 1.9 – Omar Mar 26 '14 at 07:16

1 Answers1

0

i just switched

<script src="/javascript/jquery.mobile-1.4.2/jquery.mobile-1.4.2.js"></script> 

to the last statement and remove all the JQM auto form enhancement and my page works well

Fxster
  • 189
  • 1
  • 4
  • 13