Skip to content

Instantly share code, notes, and snippets.

@philbar
philbar / gist:f160a32e6f4d6e47f9b9
Created February 2, 2015 18:50
Append URL Params to Links
<script>
$(document).ready(function() {
var params = window.location.search.replace(/ /g,'%20');
var textLink = $('.lp-pom-text a').each( function(i) {
if(this.href.indexOf('?') !== -1){
this.href = this.href + params.replace("?", "");;
}
else {
<!--[if lte IE 8]>
<script>
var oldIEhasFlash = false;
try {
oldIEhasFlash = Boolean(new ActiveXObject('ShockwaveFlash.ShockwaveFlash'));
} catch(exception) {
oldIEhasFlash = ('undefined' != typeof navigator.mimeTypes['application/x-shockwave-flash']);
}
</script>
<script>
// Youtube Video Background for Unbounce. V1.1
// lpVideoBG('#SectionID', 'YoutubeVideoID', width, height, muted);
// Use '#lp-pom-root' for a full page video background
lpVideoBG('#lp-pom-block-9', '2XX5zDThC3U', 560, 315, 0);
function lpVideoBG(pageSectionID, youtubeVideoCode, videoWidth, videoHeight, muted) {
@philbar
philbar / Pass URL Params to Links.js
Last active May 17, 2019 16:48
Pass URL Params to Links
@philbar
philbar / Magnific Popup - Youtube.html
Last active December 10, 2022 08:18
Runs a Youtube Video in Magnific Popup.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//www.youtube.com/iframe_api"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/jquery.magnific-popup.min.js"></script>
<script>
$(document).ready(function() {
// Initializes Magnific Popup
$('#lp-pom-image-202 a, #lp-pom-box-218 a, #lp-pom-box-217 a').magnificPopup({
disableOn: 700,