Skip to content
Advertisement

How to remove children with the same name from parents with the same name?

I have 4 cards(.program-card) and in each one a link(.more-link). I am trying to remove the buttons when the window width > 1024. I know how to remove multiple children with the same name from one parent element but how can this be done with multiple parents that have the same name? Javascript only ideas.

So, removing the children from the DOM is the end goal.

JavaScript
JavaScript

Advertisement

Answer

But you can do it with media query(css) as well.

JavaScript

However if you would like with js, here is solution:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement