title: Detecting Hybrid Devices
body: <p>What is the recommended way to detect and bind events for <strong>hybrid devices</strong> that support both mouse and touch?</p>
  
  <p>For example, if Modernizr had a test called <code>hybrid</code>, you might do something like this:</p>
  
  <pre><code>var handler = null;
  
  switch (true) {
    case (Modernizr.hybrid):
      handler = 'touchstart click';
      break;
    case (Modernizr.touch):
      handler = 'touchstart';
      break;
    default:
      handler = 'click';
      break;
  }
  </code></pre>