Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed Javascript onmousedown to trigger multiple images to display none
    primarykey
    data
    text
    <p>I have a website that uses a PHP foreach loop to gather products from a database. Each of those products displays the product picture and then has a jQuery plugin that allows the user to swipe or click and drag the element to the left to display more information about the product. I have included a helper image to notify the users that they can slide/swipe over the product image. After the use has swiped with a touchscreen or clicked and dragged with their mouse I want all the helper images to display none. I don't know much javascript yet, but I was thinking that this would need to be accomplished with onmousedown? </p> <pre><code>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 "&lt;li class='mix $Brand'&gt;"; echo "&lt;div class='touchslider'&gt;"; echo "&lt;div class='touchslider-viewport'&gt;"; echo "&lt;div class='touchslider-div'&gt;"; echo "&lt;div class='touchslider-item'&gt;"; echo "&lt;h1&gt;" . $Brand . " " . $Name . "&lt;/h1&gt;"; echo "&lt;img class='image-swipe' src='img/swipe.png' alt='Swipe to the Left Indicator'/&gt;"; echo "&lt;img id='brewer-imgs' height='330' src='img/products/" . $Image . "' alt='" . $Brand . " " . $Name . " Image'/&gt;&lt;/a&gt;"; echo "&lt;/div&gt;"; echo "&lt;div class='touchslider-item' id='inside-slide'&gt;"; echo "&lt;p&gt;&lt;em&gt;" . $Brand . " " . $Name . "&lt;/em&gt;&lt;/p&gt;&lt;/br&gt;"; echo "&lt;p&gt;Lowest Price $" . $Price . "&lt;/p&gt;&lt;/br&gt;"; } </code></pre> <p>the class "swipe-image" is the helper image</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload