Skip to content

Instantly share code, notes, and snippets.

View awhedbee22's full-sized avatar

Alex Whedbee awhedbee22

View GitHub Profile
@awhedbee22
awhedbee22 / Hide-Foundation-Modal-BG-Scroll.js
Last active October 12, 2017 10:30
Stop body from scrolling with Foundation 5 Reveal-Modal
$(".reveal-modal").on("open", function () {
$("body").addClass("modal-open");
});
$('.close-reveal-modal').bind("click touchstart", function () {
$('body').removeClass('modal-open');
});
<div class="container">
<div class="off-canvas-wrap" data-offcanvas="">
<div class="inner-wrap">
<section class="main-section">
<!--[if lt IE 7]>
<p class="browsehappy">
You are using an <strong>outdated &amp; unsupported</strong> Web browser (Internet Explorer 7).
Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience &amp; security.
</p>
<![endif]-->
<?php
/*
allListings.php
!!API Page!!
revised 11/6/2013 - Michael
Creates a JSON array of categories for output to the app
In order to work, page must be called with $_GET["com"] = "com.vrp.marketing"
// Reveal Contact Form
$('.reveal-contact a').attr({
'data-reveal-id': 'contactModal',
'data-reveal': ''
});
// Add Wave to all buttons
$(".button").addClass( "waves-effect waves-button waves-float" );
// Waves Click
// Fixed header
$(window).scroll(function(fixedHeader){
var headerHeight = $('#article-header').height();
var titleHeight = $('#article-header h1').outerHeight();
var fixedTop = (headerHeight - titleHeight);
if ($(this).scrollTop() >= fixedTop){
$('#article-header').addClass('fixedHeader');
$('#article-header.fixedHeader').css("top", -fixedTop);
}
setTimeout(function () {
var forEach = function (array, callback, scope) {
for (var i = 0; i < array.length; i++) {
callback.call(scope, i, array[i]); // passes back stuff we need
}
};
var highRiskCheckboxValidator = function () {
var numberOfCheckBoxesChecked = $(".high-risks input:checked").length; //number of checked boxes
angular.module('vegas.controllers', [])
// Data for this seed is stored in the "awvegas" firebase.
// To view the raw data, open https://awvegas.firebaseio.com/.json in a browser
// A simple controller that fetches a list of data from a service
.controller('ScheduleIndexCtrl', function($scope, $firebase) {
// "Items" is a service returning mock data (services.js)
var ref = new Firebase('https://awvegas.firebaseio.com/items');
$scope.items = $firebase(ref);
@awhedbee22
awhedbee22 / SiteURL.php
Last active August 29, 2015 14:06
Get Wordpress site URL
<?php echo get_site_url(); ?>
@awhedbee22
awhedbee22 / pTagRemover.php
Created September 2, 2014 16:35
Remove <p> tags and keep <br /> in wordpress. Place in functions.php
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
@awhedbee22
awhedbee22 / Grayscale.css
Last active August 29, 2015 14:04
Grayscale Hover Effect
img.grayscale {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
-ms-transition: all .5s ease-in-out;
-o-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}