Youtube Video Background for Unbounce pages - Minified
See full instructions here: https://getsatisfaction.com/unbounce/topics/how-can-i-create-a-youtube-video-background
<script>
// Youtube Video Background for Unbounce. V1.3.5
Youtube Video Background for Unbounce pages - Minified
See full instructions here: https://getsatisfaction.com/unbounce/topics/how-can-i-create-a-youtube-video-background
<script>
// Youtube Video Background for Unbounce. V1.3.5
<script> | |
//Scroll and Stick Fixed header v1.0 | |
//Replace ID below with your box ID | |
var boxToFix = '#lp-pom-box-587'; | |
var boxParent = $(boxToFix).parent(); | |
var boxClone = $(boxToFix).clone().attr('id', boxToFix + '-bg'); | |
var topPositionOfBox = $(boxToFix).position().top; |
<script> | |
//Scroll and Stick Fixed header v1.0 | |
//Replace ID below with your box ID | |
var boxToFix = '#lp-pom-box-587'; | |
function showOrHideHeader(){var o=$(window).scrollTop();o>topPositionOfBox?($(boxToFix).css({position:"fixed",top:"0px"}),$(boxClone).css({position:"fixed",top:"0px"})):($(boxToFix).css({position:"absolute",top:topPositionOfBox}),$(boxClone).css({position:"absolute",top:boxTop}))}var boxParent=$(boxToFix).parent(),boxClone=$(boxToFix).clone().attr("id",boxToFix+"-bg"),topPositionOfBox=$(boxToFix).position().top,boxHeight=$(boxToFix).css("height"),boxTop=$(boxToFix).css("top"),boxBorderWidthTop=$(boxToFix).css("border-top-width"),boxBorderWidthBottom=$(boxToFix).css("border-bottom-width"),boxBorderWidthLeft=$(boxToFix).css("border-left-width"),boxBorderWidthRight=$(boxToFix).css("border-right-width"),boxBorderStyleTop=$(boxToFix).css("border-top-style"),boxBorderStyleBottom=$(boxToFix).css("border-bottom-style"),boxBorderStyleLeft=$(boxToFix).css("border-left-style"),boxBorderStyl |
Google Analytics
This code is used to track users in GA across two completely different root domains (A.com to B.com). Insert the code below into your Unbounce landing page.
<script>
$('.lp-pom-button, .lp-pom-text a, .lp-pom-image a').click(function(event) {
var parentClass = $(this).parent().attr('class');
<script> | |
$(function() { | |
$('.lp-pom-image a, .lp-pom-text a').not('a[href^=#]').each( function() { | |
this.href = this.href + window.location.search; | |
}); | |
}); | |
</script> |
<script>
window.module.lp.form.data.validationRules['field_name'].digits = true;
</script>
Replace 'field_name' with the ID of your form field you want to add this validation to.
<script> | |
$(function() { | |
$('#lp-pom-button-22').fancybox({ | |
type: 'iframe', | |
width: 840, | |
height: 480, | |
centerOnScroll: true, | |
onStart: function() { | |
$('#fancybox-content').css({overflow: 'scroll', '-webkit-overflow-scrolling': 'touch'}); | |
} |
<script> | |
lp.jQuery(function($) { | |
var ruleID = 'currency'; | |
var field = 'money_field'; | |
var message = 'Please enter a valid currency'; | |
var rules = module.lp.form.data.validationRules[field]; | |
<script> | |
$(function() { | |
$('.lp-pom-image a, .lp-pom-text a, .lp-pom-button').not('a[href^=#]').each( function() { | |
var currentURL = this.href; | |
var hashIndex = currentURL.indexOf("#"); | |
var hasAnchor = hashIndex > -1; | |
var hashString = ""; | |
var baseURL = this.href; | |
Be sure to first change your forms confirmation to 'Goto another webpage' and set a default fallback URL
Drop this script into your javascript box. Set the placement to 'before body end tag'
<script>
$("#gender").live('change', function() {
switch ($(this).val()) {