This file contains hidden or 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
| /** | |
| * Convert ems to pixels | |
| * | |
| * @param {Number|String} value | |
| * @param {Boolean} [withUnit] | |
| * @return {Number|String} | |
| */ | |
| function convertEmToPx( value, withUnit ) { | |
| if( typeof value !== 'undefined' && value ) |
This file contains hidden or 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
| /** | |
| * Convert pixels to ems | |
| * | |
| * @param {Number|String} value | |
| * @param {Boolean} [withUnit] | |
| * @return {Number|String} | |
| */ | |
| function convertPxToEm( value, withUnit ) { | |
| if( typeof value !== 'undefined' && value ) |
This file contains hidden or 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, document, undefined ) { | |
| 'use strict'; | |
| var pluginName = 'simpleCarousel', | |
| defaults = { | |
| autoPlay : false, | |
| circular : false, | |
| className : 'carousel', | |
| fullWidth : false, |
This file contains hidden or 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
| /** | |
| * Calculate distance between two points. Credits to {@link http://www.movable-type.co.uk/scripts/latlong.html|Chris Veness} | |
| * | |
| * @param {Number|String} lat1 Latitude of point 1 in decimal degrees | |
| * @param {Number|String} lon1 Longitude of point 1 in decimal degrees | |
| * @param {Number|String} lat2 Latitude of point 2 in decimal degrees | |
| * @param {Number|String} lon2 Longitude of point 2 in decimal degrees | |
| * @return {Number} The distance between the points in kilometers | |
| */ | |
| function calculateDistance( lat1, lon1, lat2, lon2 ) { |
This file contains hidden or 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
| /** | |
| * Set and get localStorage | |
| * | |
| * @param {String} key | |
| * @param {Boolean} [sessionOnly] | |
| * @return {Object} | |
| */ | |
| var Cache = function( key, sessionOnly ) { | |
| var now = new Date().getTime(); |
This file contains hidden or 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
| /** | |
| * Detect swiping | |
| */ | |
| ;(function( $, window, document, undefined ) { | |
| var pluginName = 'detectSwipe', | |
| defaults = { | |
| direction : '', | |
| minLength : 35, | |
| onStart : function( direction, length ) {}, |
This file contains hidden or 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
| /** | |
| * Test if browser supports a CSS property | |
| * | |
| * @param {String} property | |
| * @param {Array} [prefixes] | |
| * @param {Function} [callback] | |
| * @return {Boolean|Function} | |
| */ | |
| function supportsCSSProperty( property, prefixes, callback ) { | |