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
'createTouch' in document && (jQuery.event.special.click = { | |
setup: function(data, namespaces, eventHandle) { | |
var t; | |
$(this).bind('touchstart.touchClick', function() { | |
t = +new Date; | |
}).bind('touchend.touchClick', function(e) { | |
if (+new Date < t + 200) { | |
$(this).trigger('click', e); | |
} | |
}) |
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
# Route extension-less URLs to the equivalent *.html file. | |
# For instance: example.com/about = example.com/about.html | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^\.]+)$ $1.html [NC,L] | |
</IfModule> |
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
/** | |
* Lets you limit the length of a string and truncate the end with ellipses (...). | |
* | |
* @param {String} str The String to truncate. | |
* @param {Number} limit The maximum size of the string. | |
*/ | |
function truncateWithEllipsis (str, limit) { | |
var truncatedString; | |
limit -= 3; |