Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert jquery fadeOut function to pure javascript code

//javascript
el.classList.add('hide');
el.classList.remove('show');

//css
.show {
  opacity: 1;
}
.hide {
  opacity: 0;
  transition: opacity 400ms;
}
Source by youmightnotneedjquery.com #
 
PREVIOUS NEXT
Tagged: #convert #jquery #fadeOut #function #pure #javascript #code
ADD COMMENT
Topic
Name
8+2 =