Skip to content

Tag: html

Display DIV’s on Click

I have 2 div elements, and I want to add something on the Div 2 that when I Click on that Div, it will Display Div 1, so both DIV’s will be visible when clicking Div 2! Div 2 should remain visible all the time, but when I click on DIV 2, it should display Div 1! I want a

Changing class of button and display of div with JavaScript

I have JavaScript to show/hide div on click. Inside that div are more buttons to show/hide PNGs. I want the clicked button to have a bottom border line until another button in that div is clicked. I have achieved this but each time I click on a button in the shown div the bottom border line stays on the butto…

How to add custom styles to input type=”range”

I have 4 custom input[type=”range”] on my page. I used some JS and CSS to add styles, but it seems that only the first one works properly. What am I doing wrong and how to make all of them act like the first one? I don’t want it to be like a regular range and I thought that JS +

Problem with targeting created button with addEventListener

I’m learning vanilla JS and trying to make “To-do list” project. So, idea is simple adding values from form into the list. After that I add edit/remove buttons for every li in list and put the addEventListener to that buttons. For some reason, event listener is targeted on button from form. …

change value with AlpineJS

I’m making a website and learning AlpineJS. I’m trying to make a custom ‘checkbox’ (from tailwindcss) to make people agree to the Terms of Service. Now there’s probably already a better way to do this custom checkbox because now I’m replacing the entire checkbox when you cl…

How to add vowel to arabic letter

How to add vowel to arabic letter from unicode/hexentity for example i have: U+FE8F ( ﺏ ) and want to add this vowel U+FE76 ( ﹶ ) -> ﺏﹶ U+FE8F ( ﺏ ) and want to add this vowel U+FE78 ( ﹸ ) -> ﺏﹸ I do it by js thanks in advance. Answer The Arabic script in Unicode has