Longpress simulation with onmousedown but also has onclick
<p>I have the following HTML</p>

<pre><code>&lt;li onclick="setServerID(this);" class="server-item-item" data-server="1" onmousedown="serverHold(this);" onmouseup="serverRelease();"&gt;&lt;span&gt;MyServer&lt;/span&gt;&lt;/li&gt;
</code></pre>

<p>My JS looks like:</p>

<pre><code>function setServerID(server) {
    sessionStorage.serverID = server.dataset.server;
    getServerInfo();
    gotoMain();
}
</code></pre>

<p>And</p>

<pre><code>function serverHold(server) {
    pressTimer = window.setTimeout(function() {
        var id = server.dataset.server;
        clearTimeout(pressTimer);
        $('#fav-the-server').css("visibility", "visible");
        a.slide('fav-the-server', "left", 0, "200ms", "ease", "0ms", "1", "alternate", "running");

    },1000);
    return false;
}
</code></pre>

<p>This all works fantastically thanks to previous posts I looked up on SO but the issue is that its a touchscreen type app and it executes the <code>onclick</code> </p>

<p>Anyway to do this that lets me get the following functionality:</p>

<blockquote>
  <p>List Item -> Click and Hold for 1000ms -> Execute <code>serverHold</code> and do
  not execute the <code>setServerID</code></p>
</blockquote>

<p>AND</p>

<blockquote>
  <p>List Item -> Click and do not hold or hold for less than 1000ms - >
  Execute <code>setServerID</code> only.</p>
</blockquote>

<p>Thanks!</p>
