Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9107351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:33:04+00:00 2026-06-17T02:33:04+00:00

I’m developing this small website : Website ; and I’m using HammerJS as a

  • 0

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 trying to get the event.direction or other related properties to the drag event nothing is output in the console ( I’m logging the results in the console ).

This is how I listen for the drag event ”

Application.ApplicationController.prototype.Drag = function(selector, delay, callback) {
    return $(selector).on('drag', _.debounce(function(event){
        event.preventDefault();
        return (typeof callback === 'function' && callback !== undefined) ? callback.apply( event, [ event ] ) : 'Argument : Invalid [ Function Required ]';
    }, delay)); 
};

I’m calling it something like :

this.Drag(selector, delay, function(event) {
    console.log(event.type, event.direction);
});

Could someone tell me what am I doing wrong in there or if I’m missing something ?

EDIT : I have just replaced the jQuery library : jquery.specialevents.hammer.js ; with the old jquery.hammer.js ; and it seems like now it’s responding to all events and I get all the properties I should. Still I would like to know why isn’t the one I tried to work with working ?

EDIT : I have found the underlying cause of my issue, my code depends on some libraries which I’m loading asynchronous with the Yepnope script loader, so somewhere along the way instead of loading all the libraries ( including the jquery plugin for hammer.js ), some of them are lost 🙂 I have fixed that issue and now the events have the properties that they’re supposed to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:33:05+00:00Added an answer on June 17, 2026 at 2:33 am

    Still I would like to know why isn’t the one I tried to work with working ?

    Understanding the difference between jquery.specialevent.hammer.js and jquery.hammer.js should help understand the problem. Damien, the creator of jquery.specialevent.hammer.js, explains why.

    However Eight Media decided to create their own namespace in jQuery to
    activate the events.

    $("#element").hammer({ /* options */ }).on("tap", function(ev) { 
        console.log(ev); 
    }); 
    

    So in the end they are not using the default
    jQuery eventing system. That means my existing source code which used
    jQuery mobile events has to be change. That’s why I decided to
    implement the use of Hammer.JS with the jQuery special eventing API.

    $("#element").on("tap", { /* options */ }, function(ev) {
        console.log(ev); 
    }); 
    

    I put jquery.specialevent.hammer.js onto my
    Github where you can also find a demo. Maybe Eight Media accepts my
    pull request and it will be part of Hammer.JS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.