模拟触摸
<h2>touchSimulation()</h2>
<p>构造函数</p>
<pre><code>new touchSimulation(element)</code></pre>
<h4>参数</h4>
<table>
<thead>
<tr>
<th style="text-align: left;">参数</th>
<th>类型</th>
<th style="text-align: left;">必填</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">element</td>
<td>HTMLElement</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">需要模拟触摸的元素</td>
</tr>
</tbody>
</table>
<h4>方法</h4>
<ul>
<li>touchLeft()
<blockquote>
<p>左滑</p>
</blockquote></li>
<li>touchRight()
<blockquote>
<p>右滑</p>
</blockquote></li>
<li>touchTop()
<blockquote>
<p>上滑</p>
</blockquote></li>
<li>touchBottom()
<blockquote>
<p>下滑</p>
</blockquote></li>
<li>
<p>touchClick()</p>
<blockquote>
<p>点击</p>
</blockquote>
</li>
<li>
<p>touchTo(startX, startY, endX, endY)</p>
<blockquote>
<p>指定坐标滑动</p>
<blockquote>
<p>startX :触摸开始的x坐标
startY :触摸开始的y坐标
endX :结束的x坐标
endY :结束的y坐标</p>
</blockquote>
</blockquote>
</li>
<li>示例
<pre><code>var touchSimulation = new touchSimulation(document.querySelector('#container'));
touchSimulation.touchTo(0,0,400,0);</code></pre></li>
</ul>