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
/** | |
* @name EventViewFactory | |
* @constructor | |
*/ | |
var EventViewFactory = function() { | |
return { | |
/** | |
* @name create |
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 testFeature = (function () { | |
return { | |
/** | |
* Accepts a feature name and feature test function to test for truthness | |
* @param {String} featureName of the feature being tested | |
* @param {Function} testMethod the feature test method ( this should always return true or false ) | |
*/ | |
addTest: function( featureName, testMethod ) { |
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
/** | |
* Handles set up / clean up of multiple named event timers | |
* @constructor | |
*/ | |
var TimedEventManager = function () { | |
this.timers = {}; | |
}; | |
TimedEventManager.prototype = { |
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-to-clearfix | |
*zoom: 1 | |
&:before, | |
&:after | |
content: '' | |
display: table | |
&:after | |
clear: both |
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
// Used to track the enabling of hover effects | |
var enableTimer = 0; | |
/* | |
* Listen for a scroll and use that to remove | |
* the possibility of hover effects | |
*/ | |
window.addEventListener('scroll', function() { | |
clearTimeout(enableTimer); | |
removeHoverClass(); |
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 variadic = function( fn ) { | |
var _slice = Array.prototype.slice; | |
var _length = fn.length; | |
if ( _length < 1 ) { | |
return fn; | |
} | |
if( _length === 1 ) { | |
return 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
.modal { | |
background: black; | |
color: rgb(255, 255, 255); | |
height: 200px; | |
left: 50%; | |
position: relative; | |
text-align: center; | |
top: 50%; | |
transform: translate(-50%, 50%); | |
width: 200px; |
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
<div class="modal"> | |
<div class="modal-content"> | |
modal content | |
</div> | |
<div class="modal-overlay"></div> | |
</div> |
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
<div class="modal"> | |
modal content | |
</div> |
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
/** | |
* When working with Named function expressions which one of the following is preffered and why? | |
*/ | |
/* Use the same name for the function and the variable its assigned to.*/ | |
var foo = function foo() { | |
return foo; | |
} | |
/* Use a different name for the function and the variable its assigned to. */ |
OlderNewer