Touchstart doesn't work properly

194 Views Asked by At

On my company website, there is a button like this one:

<script>function expandfullscreenmenu(action){
  if (!('ontouchstart' in document.documentElement)) {
    var togglebox = document.getElementById("togglebox");
    var newstate = (action == 'open')? true : (action == 'close')? false : !togglebox.checked;
    togglebox.checked = newstate;
  }
}</script><div class="hamburger-button">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar" id="menu"  onclick="expandfullscreenmenu('open'); return false">
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
</button></div>

The problem is that a user cannot 'tap' the button with a native browser on a Galaxy Tab 3. However, using Chrome on an LG Phone, the button works fine. In addition, many types of 'touchstart' stuff has been tried, but none of it is working on this this website. What is missing?

(The website can be viewed here.)

0

There are 0 best solutions below