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
/*SVG CHECK*/ | |
function svgCheck(){ | |
if (!Modernizr.svg) { | |
$('img.svg').each(function () { | |
svg = $(this).attr('src'); | |
svg = svg.replace('svg', 'png'); | |
$(this).attr('src', svg); | |
}); | |
} | |
} |
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
The function for the horizontal scrolling effect is the following: | |
$(function() { | |
$('ul.nav a').bind('click',function(event){ | |
var $anchor = $(this); | |
/* | |
if you want to use one of the easing effects: | |
$('html, body').stop().animate({ | |
scrollLeft: $($anchor.attr('href')).offset().left | |
}, 1500,'easeInOutExpo'); |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="utf-8"> | |
<title>GREYnyc boilerplate</title> | |
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen"> <!-- Cross browser styling standardization --> | |
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"> <!-- Custom styling for this page --> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <!-- Cloud hosted jQuery code --> | |
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="path/to/your/jquery"><\/script>')</script> <!-- Local jQuery file fallback --> | |
<script src="js/script.js" charset="utf-8"></script> <!-- Custom scripts for this page --> |
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
/*Add to your script:*/ | |
jQuery.fn.capitalize = function() { | |
$(this[0]).keyup(function(event) { | |
var box = event.target; | |
var txt = $(this).val(); | |
var start = box.selectionStart; | |
var end = box.selectionEnd; | |
$(this).val(txt.replace(/^(.)|(\s|\-)(.)/g, function($1) { | |
return $1.toUpperCase(); | |
})); |
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
var ispeech; | |
var message; | |
var canPlayOgg = !!(new Audio().canPlayType('audio/ogg; codecs="vorbis"')); | |
if(canPlayOgg == true){ | |
ispeech = "http://api.ispeech.org/api/rest?apikey=developerdemokeydeveloperdemokey&action=convert&voice=usenglishmale&format=ogg&text="; | |
} else{ | |
ispeech = "http://api.ispeech.org/api/rest?apikey=developerdemokeydeveloperdemokey&action=convert&voice=usenglishmale&text="; | |
} | |
$("#submit").click(function(){ | |
message = $("#text").val(); |
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
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="path/to/your/jquery"><\/script>')</script> |
NewerOlder