JS and UI Design

JavaScript is often used to manipulate various aspects of the GUI in web applications; articles in this category are strictly focused on this manipulation.

  1. Should you use querySelector or getElementById?; querySelector is more flexible, and able to perform more complex selections.
  2. Easily check if an element is either hovered or in focus using plain JavaScript.
  3. The Width and Height of the browser Window can be obtained through the innerWidth and innerHeight properties; these can be checked by an event handler to detect resize events.
  4. You can either use a pure JavaScript solution, or you can choose to go with a library such as JQuery. Either way, this short tutorial show how it is done. Enjoy!
  5. To handle forms with JavaScript we may attach the preventDefault method to the submit event of the form, this allows us to handle the form data from our script instead.

JavaScript and UI Design

This category is dedicated to GUI manipulation with JavaScript.