Skip to content
Code Snippets
Useful code to copy and paste
  • ALL
  • Drupal 8
  • HTML
  • JavaScript
  • PHP
  • Unity
  • WordPress

Category: WordPress

Changing the height and the source attributes of WordPress images using JavaScript

January 14, 2020 admin Leave a comment

I wanted to change the resolution of the generated thumbnails images located in my posts section page of my personal…

Continue Reading →

Posted in: JavaScript, WordPress Filed under: javascript, wordpress

Button Styles (HTML + CSS)

March 26, 2019 admin Leave a comment

These are the button styles that our team uses at work, I save them here for an easy copy and…

Continue Reading →

Posted in: Drupal 8, HTML, WordPress Filed under: CSS, drupal 8, html, wordpress

Insert HTML before element in JavaScript

July 16, 2018 admin Leave a comment

With this method (supported by all major browsers, including IE 4), you can take an arbitrary HTML string, and insert…

Continue Reading →

Posted in: Drupal 8, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Replace the contents of an HTML element (HTML + JavaScript)

June 15, 2018 admin Leave a comment

Setting the value of innerHTML lets you easily replace the existing contents of an element with new content. For example,…

Continue Reading →

Posted in: Drupal 8, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Forcing INPUT text to lowercase

May 16, 2018 admin Leave a comment

On every keystroke, a JavaScript event is triggered to convert the value to lowercase. <input type=”text” onkeyup=”this.value = this.value.toLowerCase();”>

Continue Reading →

Posted in: Drupal 8, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Forcing INPUT text to uppercase

admin Leave a comment

On every keystroke, a JavaScript event is triggered to convert the value to uppercase. <input type=”text” onkeyup=”this.value = this.value.toUpperCase();”>

Continue Reading →

Posted in: Drupal 8, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Website Redirects

May 1, 2018 admin Leave a comment

HTML redirects Perhaps the simplest way to redirect to another URL is with the Meta Refresh tag. We can place…

Continue Reading →

Posted in: Drupal 8, HTML, JavaScript, PHP, WordPress

Categories

  • Bash
  • C#
  • CSS
  • Drupal 8
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • PHP
  • Raspbian
  • Terminal
  • Uncategorized
  • Unity
  • WordPress
  • ALL
  • Drupal 8
  • HTML
  • JavaScript
  • PHP
  • Unity
  • WordPress
Copyright © 2021 Code Snippets — Escapade WordPress theme by GoDaddy