A Pen by Harry Newsome on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soundbouncer = { | |
_: { | |
playerFrame: false, | |
eventId: false, | |
}, | |
init: function() { | |
this._.eventId = ((new Date()).getTime()); | |
this.setPlayerFrame(); | |
this.playTrack('1nKclWMxh7nPbrxHrteHOB'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Determine if an element is in the visible viewport | |
function isInViewport(element) { | |
var rect = element.getBoundingClientRect(); | |
var html = document.documentElement; | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || html.clientHeight) && | |
rect.right <= (window.innerWidth || html.clientWidth) | |
); |
- Insert redirects
- Menu links are correctly hooked up
- get_path_page ids are correct (
failure.php
,confirm.php (terms)
,listing-deadline
) - Check group fields that use
position
are being sorted usingusort($GROUP[0], 'pos_compare')
Tip: Search forforeach($GROUP
- Labels are being used where needed. E.g Headings that are not being pulled from CMS/Shop databases
- Listing Thumbnails update on option change
- Remove content areas and images from pagetypes that do not require them.
- Remove bloated additional / group querys
header
&listing
- Style category pagination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Utils | |
var is = { | |
arr: function(a) { return Array.isArray(a) }, | |
obj: function(a) { return Object.prototype.toString.call(a).indexOf('Object') > -1 }, | |
svg: function(a) { return a instanceof SVGElement }, | |
dom: function(a) { return a.nodeType || is.svg(a) }, | |
num: function(a) { return !isNaN(parseInt(a)) }, | |
str: function(a) { return typeof a === 'string' }, | |
fnc: function(a) { return typeof a === 'function' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> | |
<div class="top-bar"> | |
<div class="top-bar--inner"> | |
<div class="brand"> | |
</div> | |
<div class="button sel"> | |
<div class="button--inner"> | |
<span></span> | |
<strong>Follow Me (F)</strong> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Importing Stylsheets / Partials | |
|-------------------------------------------------------------------------- | |
*/ | |
@import 'core'; | |
@import 'theme'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = [ | |
"children_name" => "Colour", | |
"children_type" => "swatch", | |
"children" => [ | |
[ | |
"value" => "Red", | |
"colour" => "#f00", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".element").each(function(i, e){ | |
setTimeout(function() { | |
$(e).addClass(".anim") | |
}, i * 400) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| With .on Click | |
|-------------------------------------------------------------------------- | |
*/ | |
$(".parent").on('click', '.element', function() { | |
$('html, body').animate({ | |
scrollTop: $("#elementtoScrollToID").offset().top | |
}, 2000); |
NewerOlder