Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

label animation css

const inputs = document.querySelectorAll("input");

inputs.forEach((input) => {
  input.addEventListener("focusin", (e) => {
    e.target.previousElementSibling.classList.add("active");
  });

  input.addEventListener("focusout", (e) => {
    e.target.previousElementSibling.classList.remove("active");
  });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: passing json as datasource to jasper report library 
Javascript :: eslint stop compliant import from node_modules 
Javascript :: prisma.db sqlite 
Javascript :: how to decode jwt token in react 
Javascript :: multiple replace 
Javascript :: Clone Array Using Spread Operator 
Javascript :: methods of object js 
Javascript :: get array by array of indices js 
Javascript :: merge binary tree 
Javascript :: check if something is a letter in js 
Javascript :: angular $http abort request 
Javascript :: node js 
Javascript :: d-block d-none js 
Javascript :: two days before in moment 
Javascript :: merge two sorted linked lists 
Javascript :: react native use route undefined 
Javascript :: nodejs mysql transactions 
Javascript :: Don’t Use If-Else and Switch in JavaScript, Use Object Literals 
Javascript :: unexpected token react 
Javascript :: multiple elements with same id jquery 
Javascript :: wild card select jquery 
Javascript :: online password generator 
Javascript :: vue radio checked if 
Javascript :: svg auto size 
Javascript :: error handling in node.js 
Javascript :: progress bar loading ajax 
Javascript :: source code angular material LOGIN PAGE 
Javascript :: detect system dark mode tailwind css 
Javascript :: text slider in react js 
Javascript :: udpdate records using axios http put method 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =