I am trying to improve my skills in React here and I wanted to build my portfolio, so I decided to have custom slider instead of using a library, so I use the following code: It is working pretty fine except for two issues: After showing the last card I want arrow for next to not be clickable; After going
Tag: css
jquery event handler only running once
I am having problems with jqueries “click” event handler, its working only once, and then it stops, please I need help fixing it. What I did is, I use an image as a button, for my Web app but, through jquery, but it only runs once. Here is the code: Please tell me if you need more info, Thanks. Answer
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 to close all
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 that
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
React Using addEventListener(“scroll”, function()) and useState shows no transition
I want to change background color of navigation gradually with transition like this Article.js Article.css When I run these, class name ‘active’ is added to the [div] but its background color is changed quickly from rgb(248, 249, 250) to rgb(255, 255, 255). I think this is because addEventListener changes isScrolling every scroll and rerenders the [div] element and its children.
How to clamp/unclamp blocks of text in jQuery or Vanilla JS?
I can’t figure out how to do the following in jQuery or Vanilla JS. For the layout below I want to do the following: Compress each text block using multi-clamp library to three (3) lines. When you click on the “Read more” button or on the block itself, that block of text should “expand” (unclamp) completely. So far I’ve only
Website Refreshes After Clicking Button JavaScript [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 months ago. Improve this question When Clicking A specific Button, (Submit) the page Refreshes, I really don’t want
How can I resize element to fit its parent element?
I want to place the <input> element inside <td> without the <td> element being resized. These are my CSS codes: My JavaScript codes: I’m using this.body because these two codes are inside the class constructor. How can I solve this problem? I tried to use max-width and max-height, but they aren’t working. Answer Try to give your input position:relative, and
After executing a function style is no more displayed
I need to display some boxes, however when I activate the function to order them the padding between each box desappears. Do you know how to fix this? There is also some css code for the style of the list. But when i execute the function mia_posizione the padding between the boxes is canceled and they are displayed all too