Skip to content

Instantly share code, notes, and snippets.

View DevlopersField's full-sized avatar

Viraj Chaudhary DevlopersField

View GitHub Profile
@DevlopersField
DevlopersField / dynamic-form.html
Created March 21, 2024 14:06 — forked from RobertCam/dynamic-form.html
Have an Unbounce form redirect to different URLs based on a dropdown selection
<script>
/*
Unbounce Community :: Tips & Scripts :: Dynamic Form Confirmation URL's Using Browser Redirects
TS:0002-04-051
***********************
Do not remove this section. It helps our team track useage of external workarounds.
*/
var url = $("#destination");
var formDestination = document.getElementById('form_destination'); // Add ID of dropdown field
@DevlopersField
DevlopersField / a.readme.md
Last active March 14, 2024 06:57 — forked from noahub/count_up.js
Count Up Animation

Instructions

Step 1. Paste the Javascript code in the Javascript section with placement ‘Before Body End Tag’. On line 14, you have the option to set the duration of the animation (in ms).

Step 2. Create a textbox element and enter a number. This will be your starting number.

Step 3. With the text editor still open, click the ‘Source’ button.

@DevlopersField
DevlopersField / onscroll_animations.css
Created December 28, 2023 11:28 — forked from noahub/onscroll_animations.css
On-scroll Animations
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css">
<style>
.revealOnScroll{opacity:0;}
</style>
@DevlopersField
DevlopersField / back_to_top.css
Created December 28, 2023 11:27 — forked from noahub/back_to_top.css
Back to Top Button
<style>
/* Replace #lp-pom-button-18 with the ID of your back to top button */
#lp-pom-button-18 {
position: fixed;
top: auto;
left: auto;
bottom: 0;
right: 0;
margin-bottom: 2%;
margin-right: 2%;
<style>
/* Update #lp-pom-box-53 with the ID of your landing page's box element. */
#lp-pom-box-53, #lp-pom-box-53-color-overlay {display: none;}
</style>
@DevlopersField
DevlopersField / dropdownformconfirmationurl.md
Last active March 21, 2024 06:18 — forked from noahub/dropdownformconfirmationurl.md
Unbounce | Change form destination URL by dropdown selection on Unbounce
  1. Be sure to first change your forms confirmation to 'Goto another webpage' and set a default fallback URL

  2. Drop this script into your javascript box. Set the placement to 'before body end tag'

<script>

$("#gender").live('change', function() {
 
 switch ($(this).val()) {
@DevlopersField
DevlopersField / full_height.js
Created December 28, 2023 11:24 — forked from noahub/full_height.js
Full Height Section
<script>
//Replace this ID with the full height section ID
var sectionId = "#lp-pom-block-8";
//box
var section = document.querySelector(sectionId);
var sectionChildren = section.children;
var otherContent = $('.lp-positioned-content').children();
var builderHeight = $(sectionId).height();
//find initial box height
var initHeight = builderHeight;
@DevlopersField
DevlopersField / input_types.js
Created December 28, 2023 11:24 — forked from noahub/input_types.js
Change Form Field Input Types
<script>
window.onload = function() {
//set up input styling
var newStyle;
getInputStyle();
//Use the setType function to update the input type. First parameter is input name, second is the input type.
setType("phone","tel");
setType("email","email");
setType("date","date");
setType("phone","tel");
@DevlopersField
DevlopersField / 1-confetti.js
Created December 28, 2023 11:23 — 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='
@DevlopersField
DevlopersField / particle.js
Created December 28, 2023 11:23 — forked from noahub/particle.js
Add Particle.js to page section
<script src="https://cdn.jsdelivr.net/npm/particles.js@2.0.0/particles.min.js"></script>
<script>
var section = "#lp-pom-block-8";
$(section).prepend('<div id="particle-js"></div>');
particlesJS.load('particle-js', "https://cdn.jsdelivr.net/npm/particles.js@2.0.0/demo/particles.json", function() {
console.log('callback - particles.js config loaded');
});
</script>