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

Tag: drupal 8

Custom Drush Commands

October 11, 2019 admin Leave a comment

Increase the image storage size for the “Single Page – Page Header Row” from 256kb to 512kb. Admin URL: /admin/structure/media/manage/single_page_page_header/fields/media.single_page_page_header.field_media_image_8…

Continue Reading →

Posted in: Drupal 8, Drush Filed under: drupal 8, drush

Styling a Drupal 8 events “View” page to have thumbnails (CSS)

April 8, 2019 admin Leave a comment

Example:https://cms.staging.uccs.edu/business/business-research-index Configuring the View page: FORMAT: Unformatted listSettings: SHOW: FieldsSettings: FIELDS:Add and organize the following fields as shown in the…

Continue Reading →

Posted in: CSS, Drupal 8 Filed under: CSS, drupal 8

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

Accordion with effect (HTML + JavaScript)

admin Leave a comment

Example: https://codepen.io/astralmemories/pen/drEypr Code: <style> .ui-accordion-content a:link, .ui-accordion-content a:hover, .ui-accordion-content a:active, .ui-accordion-content a:visited {   color: #428bca; } </style> <link href=”https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css” rel=”stylesheet”>…

Continue Reading →

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

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

December 18, 2018 admin Leave a comment

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, HTML, jQuery Filed under: drupal 8, html, jQuery

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

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