Skip to content

Instantly share code, notes, and snippets.

View asha23's full-sized avatar
🎩
Working from home

Ash Whiting asha23

🎩
Working from home
View GitHub Profile
@asha23
asha23 / WP 1 Page Loop
Created July 24, 2013 10:56
Loop for Single Page infinite scroll
<?php
get_header();
?>
<div id="container">
<a name="top"></a>
<?php
$args = array(
'sort_order' => 'ASC',
'sort_column' => 'menu_order', //post_title
'hierarchical' => 1,
@asha23
asha23 / ios javascript
Created August 12, 2013 18:25
Returns true or false if IOS.
iOSDevice = !!navigator.platform.match(/iPhone|iPod|iPad/);
@asha23
asha23 / Css Reset - Standard
Created September 4, 2013 14:56
Css Reset
/* =============================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects block display not defined in IE6/7/8/9 & FF3
*/
/*
* Vanilla JS - Touch Gestures
* @version 0.1
* @inspired QuoJS - http://quojs.tapquo.com
*
* Supported Gestures: singleTap, doubleTap, hold,
* swipe, swiping, swipeLeft, swipeRight, swipeUp, swipeDown,
* rotate, rotating, rotateLeft, rotateRight, pinch, pinching,
* pinchIn, pinchOut,
* drag, dragLeft, dragRight, dragUp, dragDown
@asha23
asha23 / fx.js
Created October 2, 2013 16:53 — forked from vitalyrotari/fx.js
(function (window, Element, undefined) {
'use strict';
var prefix = '',
eventPrefix,
vendors = { Webkit: 'webkit', Moz: '', O: 'o', ms: 'MS' },
document = window.document,
testEl = document.createElement('div'),
supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,
transform,
@media only screen and (min-device-width: 800px) and (orientation: portrait) {
#device:after {
content: "Nexus 7 - portrait - firefox";
}
}
@media screen and (min-device-width : 602px) and (orientation: portrait) {
#device:after {
content: "Nexus 7 - portrait - chrome";
}
}
@asha23
asha23 / Widow Fix
Created November 18, 2013 11:31
Widow fix (jQuery)
(function($) {
jQuery.fn.widowFix = function(userOptions) {
var defaults = {
letterLimit: null,
prevLimit: null,
linkFix: false,
dashes: false
};
var wfOptions = $.extend(defaults, userOptions);
if (this.length) {
@asha23
asha23 / Modal window (very simple)
Last active December 28, 2015 16:08
Very simple modal window
<style>
#background-popup{
display:none;
position:fixed;
height:100%;
width:100%;
top:0;
left:0;
background:#000000;
border:1px solid #cecece;
@asha23
asha23 / Bootstrap Carousel Navi
Created November 27, 2013 15:16
Bootstrap carousel navigation scripts