Instantly share code, notes, and snippets.

View api-call.html
<style>
#news-result{text-align:center;width:50%;margin:auto;font-family:sans-serif;font-size:14px}.header-image{width:100%;height:150px;background-size:cover;background-position:center}#news-result a{display:inline-block;background:red;margin-bottom:50px;padding:8px 26px;color:#fdfdfd;text-decoration:none;text-transform:uppercase;font-size:12px}
</style>
<!-- results go here -->
<div id="news-result">
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
View multi_file_upload.php
<style>
.message-confirm li {line-height: 260%;}.message-confirm {margin-bottom: 15px;position: absolute;top: 0;background: #fff;width: 50%;margin-left: 25%;min-height: 300px;z-index: 3;border: 2px solid;padding-top: 20px;animation-name:message-confirm;animation-iteration-count:1;animation-duration:.5s;animation-fill-mode:forwards;animation-timing-function:ease-in;margin-top:20px;}@-webkit-keyframes message-confirm {0%{margin-top:0;}100%{margin-top:20px;}}@keyframes message-confirm {0%{margin-top:0;}100%{margin-top:20px;}}.file_drag_to:hover,.file_input:hover,.flexor{cursor:pointer}body{padding-top:15px;padding-left:15px;padding-right:15px;margin:0;font-family:arial,sans-serif}.file_drag_to{width:100%;margin-top:15px;height:50%;background:#FFEB3B;border:2px solid #222;position:relative;transition:.5s}.file_input,.flexor{position:absolute;width:100%;height:100%}.the_green{background:#dcffb3!important;transition:.5s ease-in}.file_drag_to:hover{background:#fdfdfd;transition:.5s}.file_input{opacity:0}.flexor{top
View local_storage_modal_display.js
if ($(window).width() < 768) {
//* if local storage is supported or not -->
if (typeof Storage !== "undefined") {
/* update variable -->*/
var keyName = 'hulc_hand';
/* store local storage item into variable -->*/
var hand = localStorage.getItem(keyName);
View fixed_downArrow.html
<style>
.arrowDown {
position: absolute;
top: 0;
right: -100px;
z-index: 3;
text-align: center;
width: 100px;
}
View divChangeFix.html
<style>
#altContainer {
position:absolute;
min-height:500px;
width:400px
}
View backgroundLoad.js
/* //////// SHOW HEADER BACKGROUND IMAGES ONCE PAGE LOADS /////////*/
$(function(){
/* div container image store in variable */
var $div = $('.home .topHeadForNavBar'),
/* store background image css property as variable */
bg = $div.css('background-image');
if (bg) {
var src = bg.replace(/(^url\()|(\)$|[\"\'])/g, ''),
View wordpress_custom_component.php
<!-- add to top of functions.php -->
<?php
add_action( 'vc_before_init', 'vc_before_init_actions' );
function vc_before_init_actions() {
require get_parent_theme_file_path( '/custom_components/custom-component-header.php' );
}
?>
<!--end ->
View api.js
$('.defineThis').on('click',function (){
$('#texter').css('display','block');
var z = $(this).attr('data-id');
$.ajax({
type:'GET',
dataType: 'XML',
url :'http://www.dictionaryapi.com/api/v1/references/collegiate/xml/'+ z +'?key=XXXXXXXXXXXXXXXXXXXXXXXXXXX',
success: function(xml) {
var d = $(xml).find("dt");
var g = 'https://www.google.co.th/search?q=';
View addNewRowFormProccess.php
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST)) {
include 'config.php';
date_default_timezone_set('Bangkok/Thailand');
$date = $_POST["dateTimeLocal"];
$homeTeamEnter = $_POST["homeTeamChange"];
View formAjax.js
$('#theContactForm').submit(function(e){
var fullName = $("#name").val();
var sEmail = $('#email').val();
var subject = $('#subject').val();
var message = $('#message').val();
if(fullName == ""){
$('#name').css('border','1px solid red');
} else {