Skip to content

Instantly share code, notes, and snippets.

@megub
megub / button-underline
Created July 12, 2016 18:44
Add underline to button label
<style>
.lp-pom-button .label {
text-decoration: underline;
}
</style>
@megub
megub / rtl-support
Created June 20, 2016 18:23
RTL form support including, labels, checkboxes
<style>
form input,
form textarea,
form select,
form select option {
direction:rtl;
left:0 !important;
}
div.lp-pom-root .lp-pom-form-field label {
right:0;
@megub
megub / facebookformfill.md
Created April 19, 2016 16:25 — forked from kalupa/facebookformfill.md
Fill your Unbounce Forms using Facebook data
@megub
megub / move-error-box.css
Created February 5, 2016 19:01
Change placement of form validation error box
<style>
.lp-form-errors {
left: 973px !important;
}
@media screen and (max-width: 600px) {
.lp-form-errors {
left: 0px !important;
}
@megub
megub / updated-external-conversion-tracking
Created December 21, 2015 23:28
Updated External Conversion Tracking - to work with WP domains
<script type="text/javascript">
var _ubaq = _ubaq || [];
_ubaq.push(['trackGoal', 'convert']);
(function() {
function UnbounceAnalytics(commands) {
this.trackingUrl =
('https:' == document.location.protocol ? 'https://' : 'http://') +
"t.unbounce.com/trk"+"?";
this.commands = commands;
@megub
megub / Add line break to button label
Created October 19, 2015 22:48
Add line break to button label
<script>
$('#lp-pom-button-251').html('<span class="label">Push to Call<br>1-855-884-1381</span>')
</script>
@megub
megub / random-number
Last active September 23, 2015 20:44
Generate random number
<script>
function randomInt(min,max) {
return Math.floor(Math.random()*(max-min+1)+min);
}
document.getElementById("hiddenfieldIDhere").value = randomInt(1,100);
</script>
@megub
megub / multiple-types-call-tracking
Last active October 28, 2015 18:08
Multiple types of Call Tracking Numbers - standard text and clickable links
<script>
var callback = function(formatted_number, unformatted_number) {
var numberLinks = document.getElementsByClassName('number_link');
for (i = 0; i < numberLinks.length; i++) {
// Change clkn to clkg if you are tracking your links as Unbounce conversion goals
numberLinks[i].href = "clkn/tel/" + unformatted_number;
numberLinks[i].innerHTML = "";
@megub
megub / flip-image
Created August 5, 2015 22:03
Flip an image/gif
#lp-pom-image-146 {
-moz-transform: scaleX(-1);
-o-transform: scaleX(-1);
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
filter: FlipH;
-ms-filter: "FlipH";
}
@megub
megub / delayed-redirect
Last active August 29, 2015 14:26
Delay Form Confirmation Redirect
<script type="text/javascript">
window.setTimeout(function(){
window.top.location.href = 'http://www.google.com/';
}, 3000);
</script>