I wanted to change the resolution of the generated thumbnails images located in my posts section page of my personal…
Example of how to read values from an external XML using PHP json_encode and JavaScript. Read in the values from…
Example: CodePen Code: <div class=”myClass”></div> <script> document.addEventListener(‘DOMContentLoaded’, function() { document.getElementsByClassName(“myClass”)[0].innerHTML = “<img alt=’my image’ src=’http://astralmemories.com/img/astral-memories-logo.png’>”; }, false); </script>
This code search for all the elements of a certain class and replaces its classes for a new one. Code:…
Example: CodePen Code: <div class=”myDivClass” style=”border: 5px solid red;”> <h1>DIV 1</h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit,…
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”>…
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…
Add more height to an Input element using Javascript: <input type=”text” id=”charAndSymbolsInput” style=”height: 60px; font-size: 20px; line-height: 60px;”> <button type=”button”…
With this method (supported by all major browsers, including IE 4), you can take an arbitrary HTML string, and insert…
Setting the value of innerHTML lets you easily replace the existing contents of an element with new content. For example,…