Skip to content

Instantly share code, notes, and snippets.

@victorzen
victorzen / auto-capitalize_form_fields.md
Last active February 21, 2017 20:58
Auto-capitalize Form Fields
<script type="text/javascript">

/*
Unbounce Community :: Tips & Scripts :: Auto-capitalize Form Fields
TS:0002-08-064
***********************
Do not remove this section. It helps our team troubleshoot possible issues and track feature usage and adoption.
*/
@victorzen
victorzen / Convertable between two dates.md
Last active August 14, 2017 02:21
Trigger a convertable between two given dates
<script>
  
    //Add your Convertable code. Don't forget to add \ before the closing > as in the exmple below.
    var convStr = '<script src="//a0a1179f80df414f91512d8919c3e847.js.ubembed.com" async></script\>';	
  
    //Add the start and end dates using the format mm/dd/yyyy. 
    var startDate = '05/05/2017';
    var endDate = '05/09/2017';
 
@victorzen
victorzen / exclude_pages_from_Script_Manager.md
Last active August 14, 2017 02:22
Exclude pages from Script Manager
<script> 
$( document ).ready(function() {  
  
	//Change this ID's for the ID's of the pages you'd like to exclude.
	var exclude = ["d295a5b5-9761-4e54-a776-76fcbcafdd7e", 
                       "582eee08-77a6-4038-8e92-8c356f1bb64b", 
                       "dcd9aed3-ca05-4f9c-9fb9-4f09b44246e7"]; 
   
 //Get page id.
@victorzen
victorzen / Image_placholder.md
Last active October 23, 2017 15:32
Image place holder for embedded video
  1. Add a video using the video widget.
  2. Add an image on top of the video, making sure it covers it. You can use the Geometry tools to make sure it matches size and position.
  3. Add a 'play button' image.
  4. Paste the script choosing Before Body End tag as the placement.
  5. Replace #lp-pom-video-17, #lp-pom-image-18 and #lp-pom-image-19 for the IDs of your video, image and button image respectively.
  6. Save, republish and enjoy!

Notes: -The click on the image and button will be counted as a conversion. -You can change the image fadeout speed by changing the value in line $(".dis").fadeOut(2000); The value is in milliseconds.