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…
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”> </div> <script> $(“#PlaceToPutTable”).load(“https://www.uccs.edu/admissions/request #block-uccsbase-home-content”); </script> More…
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,…
Clear Input Field on Focus: <!– When the input field gets focus, replace its current value with an empty string…
<!– The text field –> <input type=”text” value=”Hello World” id=”myInput”> <!– The button used to copy the text –> <button onclick=”myFunction()”>Copy text</button> <script> function myFunction()…
Auto Select Textarea Text: <textarea rows=”10″ cols=”50″ onclick=”this.focus();this.select()” readonly=”readonly”> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod…
On every keystroke, a JavaScript event is triggered to convert the value to lowercase. <input type=”text” onkeyup=”this.value = this.value.toLowerCase();”>