recentpopularlog in

piperh : add   13

Styling Based on Scroll Position | CSS-Tricks
js for modifying css depending on scroll position, by Chris Coyier. Starts with Rik Schennink js (that I've pinboarded separately) then recommends IntersectionObserver and presents another js solution.
webdesign  web  design  scroll  css  js  javascript  script  position  add  modify  class  change  style  data-scroll  styling 
may 2019 by piperh
Element.classList - Web APIs | MDN
mdn reference page showing possible methods to use with element.classList: you can toggle classes, add, remove and other stuff I don't fully understand
webdesign  web  design  code  coding  js  javascript  script  element  classlist  reference  method  add  remove  toggle 
november 2016 by piperh
#150: Hey designers, if you only know one thing about JavaScript, this is what I would recommend | CSS-Tricks
brilliant little tutorial showing how to use vanilla js event listener, for click. Ideal for toggling a style on an element on click, but has many other possibilities. "event" could be many other things than click, and classList could be many other things than "toggle"
webdesign  web  design  js  javascript  script  event  listener  toggle  add  remove  class  css  state  code  coding 
november 2016 by piperh
Quick Tip: Add or Remove a CSS Class with Vanilla JavaScript
article explaining 2 mthods for using vanilla js to and remove classes to elements
webdesign  web  design  code  coding  vanilla  js  javascript  class  name  add  remove  apply  user  action  browser 
october 2016 by piperh
Simple JavaScript class toggle using classList
codepen showing use of vanilla js to toggle a class. Shows the html, css and js. In this case the class is toggled on a different element to the clicked one. Play with it!
Instead of 'click' you can use 'mouseover'. Or instead of toggle you can add or remove.
webdesign  web  design  js  javascript  vanilla  code  coding  css  html  toggle  class  add  remove  element 
july 2016 by piperh
desandro/classie · GitHub
lightweight vanilla js for adding removing toggling classes, but could be too nerdy for me. No instructions, no manual of how to apply or what events it could react to.
webdesign  web  design  js  javascript  add  remove  toggle  class  css  vanilla 
may 2015 by piperh
Bookmarking Without JS
shows how to add social links to a page without needing or using js
webdesign  web  design  bookmark  social  logo  facebook  twitter  add  js  javascript  howto  code  coding  tutorial 
july 2014 by piperh

Copy this bookmark:

to read