Nadarajah Posted June 17, 2019 Share Posted June 17, 2019 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 More sharing options...
Ingolme Posted June 17, 2019 Share Posted June 17, 2019 It would be best to do that with a server-side language like PHP because Javascript poses an accessibility risk. Link to comment Share on other sites More sharing options...
Nadarajah Posted June 17, 2019 Author Share Posted June 17, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now