Suljettu

Swipe without swing

Hello! we need some help..

we have this swipe code, we have to move beetween page but the swipe can't swing (like in the pic).

this is our code someone can fixit?

<script>

var touchStartTimeStamp = 0;

var touchEndTimeStamp = 0;

[login to view URL]('touchstart', handleTouchStart, false);

[login to view URL]('touchmove', handleTouchMove, false);

var xDown = null;

var yDown = null;

function getTouches(evt) {

return [login to view URL] || // browser API

[login to view URL]; // jQuery

}

function handleTouchStart(evt) {

const firstTouch = getTouches(evt)[0];

xDown = [login to view URL];

yDown = [login to view URL];

touchStartTimeStamp = [login to view URL];

}

function handleTouchMove(evt) {

if ( ! xDown || ! yDown ) {

return;

}

var xUp = [login to view URL][0].clientX;

var yUp = [login to view URL][0].clientY;

var xDiff = xDown - xUp;

var yDiff = yDown - yUp;

touchEndTimeStamp = [login to view URL];

[login to view URL](touchEndTimeStamp - touchStartTimeStamp);// in miliseconds

// alert(touchEndTimeStamp - touchStartTimeStamp);

var timeDifference = touchEndTimeStamp - touchStartTimeStamp;

if(timeDifference > 75){

if ( [login to view URL]( xDiff ) > [login to view URL]( yDiff ) ) {/*most significant*/

if ( xDiff > 0 ) {

/* left swipe */

tabUnshow();

[login to view URL] ='pg/[login to view URL]';

} else {

/* right swipe */

[login to view URL] ='[login to view URL]';

}

} else {

if ( yDiff > 0 ) {

/* up swipe */

[login to view URL]('up');

} else {

/* down swipe */

[login to view URL]('down');

}

}

/* reset values */

xDown = null;

yDown = null;

}

}

</script>

Taidot: Javascript, jQuery / Prototype, HTML5, iPhone, PHP

Näytä lisää: windows api hello world, jquery message time alert, office communications server application api hello world, jquery yahoo map api example, google earth com api hello world, jquery selected manipulation api, jquery pagination api, map api jquery, jquery google maps api, google apps api php jquery, facebook api php jquery, flickr api widget jquery, youtube api player jquery, api carousel jquery, api canvas jquery, google calendar api display jquery, facebook facebook chat api php jquery, facebook api login jquery mobile

Tietoa työnantajasta:
( 2 arvostelua ) Leghorn, Italy

Projektin tunnus: #21611398

9 freelanceria on tarjonnut keskimäärin 28€ tähän työhön

ninestar801

Hi, I have gone through your requirements and I can do this task. The skills and resources needed for this project are in my genes. I can assure you for a complete professional work in given time [login to view URL] share comp Lisää

€98 EUR 7 päivässä
(15 arvostelua)
3.8
avdo6

I am responsible and reliable. Always ready for new challenges as well as professional training. New technologies have always fascinated me and intrigued me. For myself, I can say that I'm moving, full of research spir Lisää

€18 EUR 7 päivässä
(9 arvostelua)
3.3
BelisaG

Hi there. I am very interested in your project As for me, I am a full-stack developer with 5+ years in the web development. I am a familiar in Javascript. Please contact me and let's start right now. Best Regards.

€25 EUR 7 päivässä
(1 arvostelu)
1.8
SunHongQuan

Dear Client! Look at the greatest from the smallest! If you hire me, It will be good luck for yourself. Although of I am a new freelancer of this site, I have a perfect of skill you can satisfy. I will wait your reques Lisää

€18 EUR 7 päivässä
(1 arvostelu)
1.3
LeeSong1025

I`ve read your job description very carefully. As a javascript expert,I have 5+ years experience with javascript. I can make swipe function without swing. If you give me a chance, I can make it completely in a day. I a Lisää

€15 EUR 2 päivässä
(1 arvostelu)
1.3
rhondacubit

Hi there, I’m interested in your job post. I understand your requirement and believe that I am the type of person you’ve been looking for. Please enable chat for further details and discussion. I am eager to communic Lisää

€18 EUR 7 päivässä
(0 arvostelua)
0.0
Pluton1

Hello, We hope you are doing well. We have carefully gone through your requirements for Android,iOS and web app. We have Certified expert mobile application developers with great experience. We have developed many sim Lisää

€18 EUR 7 päivässä
(0 arvostelua)
0.0
shahzaibpro

Hi, I have more than 3 years of rich experience in latest technologies like : Laravel, Shopify, Magento, WordPress . I am also very much skilled in core PHP, HTML, CSS and Javascript + Jquery. Moreover, I have good exp Lisää

€18 EUR 7 päivässä
(0 arvostelua)
0.0
Mhamzayounus

Hi there! I am new to freelancer but have been working with companies in past. In addition to my formal education and training, my 2+ year history of hands-on experiences as an IOS Developer make me an excellent match Lisää

€25 EUR 5 päivässä
(0 arvostelua)
0.0