748
questions
1
vote
0
answers
2k
views
Issue with adding gesture options to Hammer.js
I have just started using Hammer JS for the first time and am going through their getting started page (https://github.com/EightMedia/hammer.js/wiki/Getting-Started)
This is the code I have:
...
5
votes
3
answers
2k
views
Preventing default iOS webpage drag with javascript and hammerJS
I am creating a simple web app that uses the new version of hammerJS for pinch zooming. I am having an issue with the default iOS page drag when a pinch starts. This seams to override the pinch event ...
0
votes
1
answer
3k
views
Hammer JS undefined
I am trying to use yepnope with Modernizr and Hammer.js to detect and trigger touch events for a slider. This is my code. I have two errors in console and don't manage to debug. Plus I don't ...
1
vote
1
answer
820
views
hammerjs jquery pull down refresh knockout binding
I am trying to write a knockout binding handler to do a pull to refresh functionality (similar to umpteen number of apps on ios). So, I used Hammer.js for touch gestures, jquery animation to animate ...
2
votes
0
answers
446
views
Hammer.js - Rotation in Internet Explorer 10
I'm having some trouble with the hammer.js-touch-framework, to be more precise, the rotation-trigger. My code is pretty minimalistic, as you can see in this jsfiddle (I'm using jquery.hammer.js from ...
2
votes
1
answer
3k
views
Triggering Hammer.js drag/slide behavior on mouse click
I'm using Hammer.js to allow for dragging between panes. I also want to allow an alternate action where there's also a "Next" button you can click on (with a mouse) or touch (on touchscreen), that ...
6
votes
4
answers
15k
views
How do I disable vertical scrolling in iOS using Hammer.js?
I'm trying to disable vertical scrolling in iOS with Hammer.js (jQuery version) in a horizontally scrolling list. I've tried this:
$(document).hammer().on('swipe,drag', 'body',
function(event)
...
1
vote
2
answers
256
views
Hammerjs double firing on iPad
Seeing a weird issue where HammerJS + Angular makes events double fire on 'tap'.
The source / demo:
http://plnkr.co/edit/yjtZsQjRPwiuc8FuM3SO?s=hi&p=preview
On a computer, clicking is one event. ...
0
votes
2
answers
2k
views
JS that should listen for pinch in and pinch out not working
I am trying to execute a function on pinch in of the body and then another function on pinch out.
Since i'm already using jquery.hammer.js in this document and hammer can listen for in and out pinches,...
5
votes
2
answers
15k
views
Removing hammer events
I create an event using hammer.js library like this:
Hammer(myElement).on("doubletap", function(evt){
evt.preventDefault();
});
How can I then remove the registred event? Can I ...
8
votes
1
answer
5k
views
How to prevent default on touch with hammer.js
I would like to prevent an anchor from clicking through if it is tapped with a touch device, but to act normally if clicked on with a mouse.
The reason being, on desktop you hover over the anchor to ...
1
vote
1
answer
2k
views
Code that listens for swipe-up gesture not working
I am trying to run an alert when a swipe-up gesture occurs anywhere on the document; and, ultimately also when a 2 finger swipe-gesture occurs.
I've used hammer.js to listen for gestures before and ...
2
votes
3
answers
2k
views
hammer.js scroll not working with pinchin and pinchout events
I am using hammer.js to catch pinchin and pinchout events and change font size of the page. So, I have written the following code:
var touch_area = document.getElementById('touch-area');
...
0
votes
3
answers
2k
views
Run js code when two fingers are swiped up using jQuery version of hammer.js
I've been playing around with hammer.js ( http://eightmedia.github.com/hammer.js/ ) a multi-touch gesture library and I know how to execute js code when one finger is swiping up, or tapping or ...
1
vote
1
answer
2k
views
hammer drag center
I'm using Hammers library for my app. How can I drag my element from any point that I touch and not by center ? thanks !
var hammertime = Hammer(document.getElementById('contentTab'), {
...
2
votes
1
answer
8k
views
basic touch gesture not working, using hammer.js
Im just beginning to learn javascript so I can implement touch gestures, I am using the hammer.js library, but even a simple piece of code doesnt seem to work, does anyone know if Im missing something ...
1
vote
2
answers
1k
views
Creating a horizontal scroll in the iPad (preventing vertical scrolling with Hammer JS library)
I'm trying to prevent vertical scrolling in a page shown inside an app. I'm looking to use Hammer JS, but I'm not sure how should I use it. I've tried several events using event.preventDefault() but ...
1
vote
0
answers
6k
views
Hammer.js Pinch-to-zoom not working
UPDATE: Got a jsfiddle up @ http://jsfiddle.net/gacDy/7/ , however, I can't even seem to get this working correctly. I'll keep working on it, but hopefully it'll help.
I'm using Hammer.js for an app ...
0
votes
0
answers
154
views
Table data overflows on zoom
I have a table inside a <div>. The div contains a box ..
Now i have applied zoom feature to the table alone using an external plugin hammer.js.
So when i zoom my table, it overflows outside ...
0
votes
1
answer
1k
views
Detect id of div with hammer.js / by touch
I've got a grid of images with ID's. When a user pinches on a mobile touch device I want to detect over which one of those instances the user pinches. So instead of creating 30 hammer instances for ...
7
votes
2
answers
5k
views
Detect pinch to zoom when 'user-scalable' is set to yes
How can I detect the scale (or distance pinched) of the pinch to zoom when the meta name="viewport" is set to user-scalable=yes?
I've tested on Android but the pinch to zoom can't be detected if the ...
1
vote
4
answers
3k
views
Hammer.js with plain javascript
How to use hammer JS events without JQuery selectors just using plain Javascript methods?
4
votes
1
answer
2k
views
Detect Android pinch to zoom innerWidth with JavaScript/Hammer.js
I want to know the innerWith/viewport width of the pinch to zoom when it's zoomed.
If it's below 500 px I want to change the image with:
$("img#ad").attr("src", "http://img0.www.suckmypic.net/img/1/...
3
votes
1
answer
1k
views
keeping swipe up down as default using hammer
I'm using hammer js for swipe gestures on any mobile table. its a simple swipe left/right goto next/back.
But what i want it up/down to remain as they are (scroll up/down).
The code is pretty ...
12
votes
4
answers
27k
views
How to use hammer.js with Angular.js
I'm new with Angular.js and reading i know angular dont have events like tap, double tap, etc. I'm trying to combine with Hammer.js without success.
Code from gist
/**
* angular-hammer.js
* ...
1
vote
1
answer
1k
views
How to stop scrolling on touchend with mobile safari?
I'm trying to get this kind of action on a web app, which consists of a "mosaic" of views, altogether 6 columns of views in 6 rows. The navigation works nicely on a desktop browser, but with Mobile ...
3
votes
6
answers
10k
views
Limit hammer.js to horizontal swipes
I'm using Hammer.js which seems to work great and does mention that I can limit horizontal and vertical direction but I can't seem to get it to disable vertical swipe. Basically I have an off canvas ...
7
votes
2
answers
7k
views
HammerJS event properties are undefined
I'm developing this small website : Website ; and I'm using HammerJS as a touch support library.
It seems to be responding to the events, and it recognizes the event.type property, but when I'm ...
3
votes
2
answers
921
views
Why do the event args have no values when invoked with jQuery trigger()?
I tried to use a trigger event.
If I trigger events independently with my hands, I haven't got problem and event args content all fields that I need.
If I use jQuery trigger() all works, but event ...
1
vote
3
answers
2k
views
Get and set top position
I am using hammer.js to make a basic touch friendly mobile site. I have hidden the top menu with a negative top position and it will appear using css3 transitions upon a double tap. However I want it ...
0
votes
1
answer
2k
views
Calling the method provided in HTML in Knockout custom bindinghandler
I'm using both knockout.js and hammer.js in my current project. I created a custom binding handler for the 'tap' event in hammer.js (this should also work for other events such as hold or swipe). My ...
3
votes
1
answer
4k
views
Draggable drop-down menu in a website (display menu elements by touchslide)
I want to make a menu like the one in this image:
On the left side there's the complete menu (where each button is a div), but the buttons are not displayed when I open the page. I want to display ...
4
votes
1
answer
12k
views
How would I smoothly move an element using Hammer.js and JQuery?
I'm currently developing a web-app, that has to run on both computer systems and tablets. Possibly even smartphones.
Now, the menus are on one page, horizontally next to each other. The idea is that ...
0
votes
1
answer
1k
views
Hammer.js Touch gestures on cheap android tablet not working
I just bought a 7" android 4.0 tablet (Arnova 7F G3) and i'm trying to run a couple of demos to test the touch gestures. Thing is... nothing's happening when I touch the screen, whereas on the iPad, ...
5
votes
1
answer
2k
views
Using hammer.js on dynamically loaded content
I'm playing around with hammer.js for a web app.
I can get it to work just fine, except on content loaded with ajax.
I use the hammer.js special-events plugin for jquery.
The following works fine:
...
0
votes
1
answer
152
views
Image is undefined when binding a drag event after onload
When in coffeescript I try to bind the dragstart event on an image in an onload trigger I get the following error:
Uncaught TypeError: Cannot set property 'ondragstart' of undefined
Here's my code:
...
2
votes
2
answers
3k
views
How to implement touch events in backbonejs? [closed]
I need to implement touch based events in backbonejs View. I tried with hammer jquery special events but it didn't work for me.
2
votes
1
answer
1k
views
Mobile Safari Web App Zoom issue
I am building a mobile web app that uses jQuery and hammer.js for touch controls. hammer.js has a feature called "prevent_default" which turns off Safari's scrolling/zooming/prettymucheverything. I ...
3
votes
1
answer
3k
views
using backbone.js with hammer.js
Would like to know if anyone have used backbone with hammer.js and how to implement the Backbone.View with the drag, hold events of hammer.js?
0
votes
1
answer
2k
views
TypeError: can't convert undefined to object using hammer.js
I'm trying to use hammer.js and when I import it in I get this error.
TypeError: can't convert undefined to object
element.style[ prop ] =
css_props[p];
<script type="text/javascript" ...
1
vote
1
answer
2k
views
Hammer.js allowing clicks within a drag area
I'm using Hammer.js to create a mobile app-style side menu that slides out on the left. When the user swipes the side menu to the left it should close.
My problem is that none of the links within the ...
4
votes
3
answers
10k
views
Jquery touch swipe event / no jQuery mobile
I've been looking for a while for a good jQuery library that will allow me to attach touch events to the DOM elements, especially swipe / tap.
I've tried hammer.js, in the documentation it tells that ...
0
votes
1
answer
3k
views
creating a touch slider using hammer.js
To give you a little background I have been working with phonegap and jquery mobile to create a native mobile app. When using the JQUI the response on android devices seems VERY slow. In previous apps ...
1
vote
1
answer
15k
views
Adding swipe gestures to Smooth Div Scroll
I am trying to add swipe gestures to Smooth Div Scroll plugin by Thomas Kahn, since the plugin is not working on iPads and other smart devices.
Az first i was using hammer.js to add the functionality....
3
votes
1
answer
2k
views
Virtual Scrolling - Without Ajax
I've been looking around the net at various 'infinite scroll' solutions that let a user scroll through data or images on your site and either loop the data back to the start or load bits in as they ...
2
votes
3
answers
2k
views
Can't get Meteor to work with the light-weight JS touch library, hammer.js
I've read the existing posts on integrating touch events in Meteor.
The wisdom seems to be that while the API is still evolving, it might be best to avoid a package-based approach and instead just ...
11
votes
5
answers
28k
views
stopPropagation() with tap event
I'm using hammer.js and it appears that I event.stopPropagation() doesn't work with tap event.
If I click on the child, the associated event is triggered but parent's event is also triggered and I ...
6
votes
1
answer
7k
views
Delegating Hammer.js events with jQuery
I have started using Hammer.js (https://github.com/eightmedia/hammer.js) which is a great little script, but I'm unsure how to delegate the events using jQuery's .on() event handler.
I've set up a ...