我有一个使用 PHP foreach 循环从数据库中收集产品的网站。这些产品中的每一个都显示产品图片,然后有一个 jQuery 插件,允许用户滑动或单击并将元素拖动到左侧以显示有关产品的更多信息。我已经包含了一个帮助图像来通知用户他们可以在产品图像上滑动/滑动。在使用触摸屏滑动或用鼠标单击并拖动后,我希望所有帮助图像都不显示。我还不太了解javascript,但我在想这需要用onmousedown来完成吗?
foreach($result as $row)
{
$ProductID = $row['ProductID'];
$Brand = $row['Brand'];
$Name = $row['Name'];
$Image = $row['Image'];
$Price = $row['Price'];
$ArticleID = $row['ArticleID'];
$VideoID = $row['VideoID'];
echo "<li class='mix $Brand'>";
echo "<div class='touchslider'>";
echo "<div class='touchslider-viewport'>";
echo "<div class='touchslider-div'>";
echo "<div class='touchslider-item'>";
echo "<h1>" . $Brand . " " . $Name . "</h1>";
echo "<img class='image-swipe' src='img/swipe.png' alt='Swipe to the Left Indicator'/>";
echo "<img id='brewer-imgs' height='330' src='img/products/" . $Image . "' alt='" . $Brand . " " . $Name . " Image'/></a>";
echo "</div>";
echo "<div class='touchslider-item' id='inside-slide'>";
echo "<p><em>" . $Brand . " " . $Name . "</em></p></br>";
echo "<p>Lowest Price $" . $Price . "</p></br>";
}
“swipe-image”类是辅助图像