Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74381

how to filter a DIV element based on its class name/id

$
0
0

help me to write javascript code when I click the store button show the store pics(s1.jpg,s2.jpg...) and when I click the customer button show customer pics(c1.jpg,c2.jpg..)

it will be great if anyone can help me..thank you in advance :) I also added an image of my webpage for better understanding

<div class="btnContainer">
      <button  class="btn active">Store</button>
      <button class="btn">Customers </button>
    </div>

    <div class="row">
      <div class="column" id="store">
        <img src="s1.jpg" alt="" height="425px">
        <img src="s10.jpg" alt="">
        <img src="s3.jpg" alt="">
      </div>

       <div class="column" id="customer">
          <img src="c1.jpg" alt="">
          <img src="c2.jpg" alt="">
          <img src="c3.jpg" alt="">
        </div>

    </div>
  </div>

enter image description here


Viewing all articles
Browse latest Browse all 74381

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>