Skip to content
Code Snippets
Useful code to copy and paste
  • ALL
  • Acquia
  • Acquia API
  • Acquia Cloud IDE
  • Acquia Cloud Site Factory
  • Bash
  • Bootstrap
  • C#
  • CSS
  • curl
  • Drupal 8-9
  • Drupal Modules
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • Lando
  • MacOS
  • PHP
  • Raspberry Pi
  • Terminal
  • Unity
  • Website Templates
  • WordPress

Category: Drupal 8-9

Tabs with fade effect (HTML + Javascript)

March 26, 2019 Leonardo Signorelli

Example https://codepen.io/astralmemories/pen/Mxdgoy This code doesn’t work properly in CODEPEN but it will work if you paste it directly to Drupal…

Continue Reading →

Posted in: Drupal 8-9, HTML, JavaScript Filed under: html, javascript, Tabs

Load another page’s item into a div using jQuery.

December 18, 2018 Leonardo Signorelli

Load another page’s item into a div using jQuery: <script src=”https://code.jquery.com/jquery-1.10.2.js”> </script> <div id=”PlaceToPutTable”>&nbsp; </div> <script> $(“#PlaceToPutTable”).load(“https://www.uccs.edu/admissions/request #block-uccsbase-home-content”); </script> More…

Continue Reading →

Posted in: Drupal 8-9, HTML, jQuery Filed under: drupal 8, html, jQuery

Insert HTML before element in JavaScript

July 16, 2018 Leonardo Signorelli

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-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

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

June 15, 2018 Leonardo Signorelli

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-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Forcing INPUT text to lowercase

May 16, 2018 Leonardo Signorelli

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-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Forcing INPUT text to uppercase

Leonardo Signorelli

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-9, HTML, JavaScript, WordPress Filed under: drupal 8, html, javascript, wordpress

Website Redirects

May 1, 2018 Leonardo Signorelli

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-9, HTML, JavaScript, PHP, WordPress

Post navigation

Page 3 of 3
← Previous 1 2 3

If you find my articles useful and would like to show your appreciation, consider buying me a cup of coffee ☕️. Your support is greatly appreciated and helps me continue creating valuable content. Thank you!

Donate
  • ALL
  • Acquia
  • Acquia API
  • Acquia Cloud IDE
  • Acquia Cloud Site Factory
  • Bash
  • Bootstrap
  • C#
  • CSS
  • curl
  • Drupal 8-9
  • Drupal Modules
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • Lando
  • MacOS
  • PHP
  • Raspberry Pi
  • Terminal
  • Unity
  • Website Templates
  • WordPress
Copyright © 2025 Code Snippets — Escapade WordPress theme by GoDaddy