我在一个页面上有两个单独的滑动轮播,但是下一个和上一个按钮无法正常工作。
HTML
Slider 1
<div id='slider1' class='swipe'>
<div class='swipe-wrap'>
<div>
<div>0</div>
<div>1</div>
</div>
<div>
<div>2</div>
<div>3</div>
</div>
<div>
<div>4</div>
<div>5</div>
</div>
<div>
<div>6</div>
<div>7</div>
</div>
<div>
<div>8</div>
<div>9</div>
</div>
<div>
<div>10</div>
<div>11</div>
</div>
<div>
<div>12</div>
<div>13</div>
</div>
</div>
</div>
<div>
<button class='prev' onclick='slider1.prev()'>prev</button>
<button class='next' onclick='slider1.next()'>next</button>
</div>Slider 2
<div id='slider2' class='swipe'>
<div class='swipe-wrap'>
<div>0</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
<div>9</div>
<div>10</div>
<div>11</div>
<div>12</div>
<div>13</div>
</div>
</div>
<div>
<button class='prev' onclick='mySwipe.prev()'>prev</button>
<button class='next' onclick='mySwipe.next()'>next</button>
</div>