Skip to content

Tag: javascript

Close all collapsible content at once

I have the following code: There are two collapsible buttons called First question and Second question. You click on one of them to show the content and you click again to hide the content. If you opened multiple collapsible contents you have to click on each of them to close all. I need a button that allows …

get last child when using Flex order Css

I am not able to detect last child when using flex order to rearrange divs. since I have arranged order of CSS with Order. its still getting the last child as per dom tree. items divs are dynamic. so we cant use nth-child. how should I get the last child when rearranged with order. There can be multiple items…

JS background with Html text

I have found a js background and now I would like to have this background on all my php files. The problem is that html code goes either under js or behind it. How can I solve this? JS file: Another Php file where I included js: Css for Php file: Answer At the moment the cavas which ‘paints’ the