Skip to content

Instantly share code, notes, and snippets.

View TChord22's full-sized avatar
💭
I may be slow to respond.

Tasha TChord22

💭
I may be slow to respond.
View GitHub Profile
@TChord22
TChord22 / 1-confetti.js
Created April 16, 2021 06:36 — forked from noahub/1-confetti.js
Add Confetti on Form Submission
<script>
$(document).ready(function(){$('#ubpoverlay-overlay').append('<canvas id="world"></canvas>'),function(){var d,f,g,k,l,m,n,o,p,q,s,t;g=350,d=[[85,71,106],[174,61,99],[219,56,83],[244,92,68],[248,182,70]],k=2*Math.PI,l=document.getElementById('world'),n=l.getContext('2d'),window.w=window.innerWidth,window.h=window.innerHeight,s=function(){return window.w=l.width=window.innerWidth,window.h=l.height=window.innerHeight},window.addEventListener('resize',s,!1),window.onload=function(){return setTimeout(s,0)},q=function(u,v){return(v-u)*Math.random()+u},o=function(u,v,z,A){return n.beginPath(),n.arc(u,v,z,0,k,!1),n.fillStyle=A,n.fill()},t=0.5,document.onmousemove=function(u){return t=u.pageX/w},window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(u){return window.setTimeout(u,1e3/60)}}(),f=function(){function u(){this.style=d[~~q(0,5)],this.rgb='
<?php if ( get_field( 'field_name' ) ): ?>
This is displayed when the field_name is TRUE or has a value.
<?php else: // field_name returned false ?>
This is displayed when the field is FALSE, NULL or the field does not exist.
<?php endif; // end of if field_name logic ?>