Conditionally display a link in dynamic content page
I'm a "fresh" newbie, JS self-taught from the great resources provided in this forum. I want to better currently working page but lack enough knowledge atm. The situation is this:
* Multimedia database - audio clips and corresponding video clips to some of the audio ones.
* Dynamic content page showing the latest (by date) 5 or 10 clips with their info from db.
* Links provided for each clip, both to listen in a new popup window and to download the clip.
Accomplished so far: everything of the above *only* for the audio clips (and video ones but separately on a different page).
Every record in the data base has an audio clip and some of them, not all, have a video clip. E.g. there are records only with audio clips and there are records both with audio and video clips.
My question is is it possible wherever there's a video clip in the db in an already displayed db-record on the page to display 'watch' and 'download' icon for it together with already shown audio icons ('listen' and 'download')? Conditional displaying.
I read about combination between JS and CSS in almost similar situation but don't know how to apply it in my situation due to my little knowledge base at this moment. So, any help will be highly appreciated and useful as it will push me forward in learning JS. I'm almost sure this is possible as it's not a complicated issue.
I can post my so far working code, if requested. If not provided enough info on the issue, let me know.
Thank you in advance!