Skip to content

Instantly share code, notes, and snippets.

View noahub's full-sized avatar
💻
Doing computer stuff

Noah noahub

💻
Doing computer stuff
View GitHub Profile
@noahub
noahub / scroll_to_element.html
Created November 12, 2015 22:27
Scroll to Page Element on load
<script>
var element = document.getElementById("lp-pom-text-53"); //Replace with ID of your page element (Exclude the '#' sign)
element.scrollIntoView();
</script>
@noahub
noahub / cookie_to_form.html
Last active November 18, 2015 17:55
Pass Cookie Value to Form Field
@noahub
noahub / updated-external-conversion-tracking
Created December 22, 2015 21:03 — forked from megub/updated-external-conversion-tracking
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;
@noahub
noahub / conditional_fields.html
Created December 23, 2015 04:28
Conditional Form Field Visibility
<script>
$('#are_you_currently_running_ppc_Yes').click(function() {
$('#how_is_your_ppc_being_managed')[this.checked ? "show" : "hide"]("slow");
});
</script>
and
<style>
#how_is_your_ppc_being_managed {display:none;}
@noahub
noahub / redirect-form-confirmation-from-pop-up
Created December 23, 2015 22:51 — forked from megub/redirect-form-confirmation-from-pop-up
Redirect Thank you page/form confirmation dialog from pop up
To be placed on form confirmation/thank you page in head
<script>
if ( window.self !== window.parent ) window.parent.location.href = window.location.href;
</script>
@noahub
noahub / Add line break to button label
Created December 23, 2015 22:58 — forked from megub/Add line break to button label
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>
@noahub
noahub / animate_on_load.html
Last active April 4, 2017 19:03
Animate a page element on load.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.min.css">
<script>
//The page element that will be animated on page load.
var yourElement = "#lp-pom-image-54";
//The effect that will be applied to your page element. See https://daneden.github.io/animate.css/ for full list.
var yourEffect = "slideInUp";
var effectClass = "animated " + yourEffect;
$( document ).ready(function() {
$(yourElement).show().addClass(effectClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
@noahub
noahub / email_char_validation.html
Created January 27, 2016 21:50
Email Character Validation
<script>
lp.jQuery(function($) {
var ruleID = 'notWebmail';
var field = 'your_email';
var message = 'Your characters are invalid!!!';
var rules = module.lp.form.data.validationRules[field];
@noahub
noahub / 0_reuse_code.js
Created January 27, 2016 22:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@noahub
noahub / back_to_top.css
Last active December 28, 2023 11:27
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%;