Skip to content

Instantly share code, notes, and snippets.

View wpstudio's full-sized avatar

Benjamin Bradley wpstudio

View GitHub Profile
@wpstudio
wpstudio / script.js
Created July 1, 2021 12:22
Javascript for Modal Gravity Forms Webinar
<script type="text/javascript">
jQuery(document).ready(function($){
var delayInSeconds = 10;//Update to change the modal open delay (in seconds)
var modalUID = 'wpsabc';//Update to force modal to show again for anyone that closed it
var $modal = $('.wps-modal_wrapper');
var $form = $modal.find('form');
var modalRef = $form.attr('id') + '_modal_' + modalUID;
var hasClosed = localStorage.getItem(modalRef);
$modal.prepend('<button type="button" id="wps-button-close" title="Close"><span>Close</span></button>');
if ( hasClosed === null ) {
@wpstudio
wpstudio / style.css
Last active December 10, 2021 13:56
CSS for Gravity Forms Modal Webinar at WPStudio.com
/* Base Form Styles */
.wps-modal_wrapper,
.gform_confirmation_wrapper.wps-modal {
font-family: -apple-system, BlinkMacSystemFont, Hevetica Neue, Helvetica, Arial, sans-serif !important;
padding: 50px;
box-shadow: 30px 30px 80px 0 rgba(0, 0, 0, 0.05);
border-radius: 4px;
width: 100%;
position: fixed;
z-index: 999999;
jQuery(document).ready(function(){
var $window = jQuery(window),
$mainMenuBar = jQuery('#nav-module'),
$mainMenuAnchor = jQuery('#anchor-stick');
$window.scroll(function(){
var window_top = $window.scrollTop();
var div_top = $mainMenuAnchor.offset().top;
if (window_top > div_top){
$mainMenuBar.addClass('sticky');
//First step
sudo gedit /etc/hostname
//Second step
sudo gedit /etc/hosts
@wpstudio
wpstudio / upgradebrowser
Created January 25, 2013 18:53
UpgradeYourBrowser
<!--[if lt IE 7]><div class="alert">Your browser is <em>SO OLD</em> that George Bush was still president when this was being used! <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</div><![endif]-->
@wpstudio
wpstudio / dabblet.css
Created April 19, 2012 15:18
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
p {
text-align:center;