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
supportsTransitions = -> | |
docBody = document.body or document.documentElement | |
styles = docBody.style | |
prop = "transition" | |
return true if typeof styles[prop] is "string" | |
# Tests for vendor specific prop | |
vendor = ["Moz", "Webkit", "Khtml", "O", "ms"] | |
prop = prop.charAt(0).toUpperCase() + prop.substr(1) | |
i = undefined |
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
# Reference jQuery | |
$ = jQuery | |
# Adds plugin object to jQuery | |
$.fn.extend | |
# Change pluginName to your plugin's name. | |
responsiveSlider: (options) -> | |
# Default settings | |
settings = | |
debug: false |
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
# Reference jQuery | |
$ = jQuery | |
# Adds plugin object to jQuery | |
$.fn.extend | |
# Change pluginName to your plugin's name. | |
pluginName: (options) -> | |
# Default settings | |
settings = | |
option1: true |
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
browser = -> | |
val = navigator.userAgent.toLowerCase() | |
if val.indexOf("firefox") > -1 | |
browser = 'firefox' | |
else if val.indexOf("chrome") > -1 | |
browser = 'chrome' | |
else if val.indexOf("opera") > -1 | |
browser = 'opera' | |
else if val.indexOf("msie") > -1 | |
browser = 'ms' |
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
// http://stackoverflow.com/questions/2450954/how-to-randomize-a-javascript-array | |
// SHUFFLE ARRAY | |
function shuffle(array) { | |
var currentIndex = array.length, | |
temporaryValue, randomIndex; | |
// While there remain elements to shuffle... | |
while (0 !== currentIndex) { | |
// Pick a remaining element... |
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
(function (window) { | |
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
// This code is free to use by anyone (MIT, blabla). | |
// Original Author: rkorving@wizcorp.jp | |
var timeouts = {}; | |
var intervals = {}; | |
var orgSetTimeout = window.setTimeout; | |
var orgSetInterval = window.setInterval; |
NewerOlder