Simulate Long Press/Long Tap in iPhone Mockup


(Bernd Maier-Leppla) #1

Is there a possibility to simulate a long tap or long press in Hype?


You can use this jQuery function:

Set a class for the element receiving the long press, then run a regular Hype API function like ‘Continue Timeline’

  $( "div.longpressbox" ).bind( "taphold", tapholdHandler );
  function tapholdHandler( event ){
    hypeDocument.continueTimelineNamed('Main Timeline', hypeDocument.kDirectionForward, false)
}); (15.5 KB)

(Bernd Maier-Leppla) #3

You guys rock! THX!

(Bernd Maier-Leppla) #4

There is just one minor glitch: when using as web app on the iPhone, it displays “Loading” outside the initial visible area. When you’re swiping up, you’ll see the “Loading”. Has something to do with the header, sure, cos it loads the jquery function. Is there any possibility to get rid of displaying “loading”? Screenshot:


Update July 22, 2016:

To hide the loading message, use:


Silly jQuery – you can hide that by using the following in your On Scene Load function:

$.mobile.loadingMessage = false;

Here’s more info:

(Bernd Maier-Leppla) #6

Thanks! Your reactions are stellar.

(Bernd Maier-Leppla) #7

Just for your info: I tried it, but only the following is working:


Thanks – I updated my response above.