Jump to content

Question on JS


Nadarajah

Recommended Posts

Hi
I am new to JavaScript and these forums. So pleas excuse me if I say anything wrong.

I would like to ask something about this https://www.w3schools.com/howto/howto_js_portfolio_filter.asp

This (pls see below) is repeated many times with few changes. Instead would it be possible to write a function and call that function with relevant arguments?. In this case the things are changing is the image filename and a text.

Thank you

 

<div class="column nature">
    <div class="content">
      <img src="/w3images/lights.jpg" alt="Lights" style="width:100%">
      <h4>Lights</h4>
      <p>Lorem ipsum dolor..</p>
    </div>
  </div>

Link to comment
Share on other sites

Thank you Ingolme. What I am trying to do is explained in here https://discourse.processing.org/t/time-line-without-flash/12037 . After going through some of the tutorial I thought I could do with html/canvas/js. I will stick to that and continue with my coding and see how far I can go. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...