blackdynamo / jquerymobile-swipeupdown Goto Github PK
View Code? Open in Web Editor NEWA jQuery Mobile plugin to add swipe up and swipe down functionality
License: Other
A jQuery Mobile plugin to add swipe up and swipe down functionality
License: Other
Hi, i have this code and whien i swipe down nothing seems to happen. I triggered the event manually and the event listener run the code. But it doesn't seem to work when i do the action. The code:
$(".option-menu-panel").off("swipedown").on("swipedown", function(){
if($(this).scrollTop() == 0){
showPanelLoading();
getAlerts();
}
});
Can anybody help me?
This line here:
var data = event.originalEvent.touches ? event.originalEvent.touches[ 0 ] : event;
Should be more like:
var data = 'originalEvent' in event && 'touches' in event.originalEvent && event.originalEvent.touches ?
event.originalEvent.touches[0] : ('touches' in event && event.touches ? event.touches[0] : event);
Otherwise it throws an error when the touches are found in event, rather than originalevent (which isn't always there). It was causing weird results sometimes on swipeup gestures, causing subsequent javascript not to fire. I made the above change and cleared my errors and solved my issue with the subsequent js.
Hi,
I am loving this library. I would like to keep the ammount of jquery to load at an minimum. Do you know which of the components from jQuery mobile builder are required for this library to work?
http://jquerymobile.com/download-builder/
Cheers,
Dennis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.