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
<![CDATA[ | |
Within this Character Data block I can | |
use double dashes as much as I want (along with <, &, ', and ") | |
*and* %MyParamEntity; will be expanded to the text | |
"Has been expanded" ... however, I can't use | |
the CEND sequence (if I need to use it I must escape one of the | |
brackets or the greater-than sign). | |
]]> | |
<!-- |
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> | |
var dontdothis = function() { | |
document.documentElement.style.backgroundColor = '#'+(Math.random()*0xFFFFFF<<0).toString(16); | |
}; | |
setInterval(dontdothis, 1000 / 10); | |
</script> |
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
/* Smartphones (portrait & landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
<video autoplay="autoplay" muted="muted" poster="poster.jpg" style="height: auto; visibility: visible;"> | |
<source src="mp4version.mp4" type="video/mp4"> | |
<source src="webmversion.webm" type="video/webm"> | |
</video> |
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 validateEmail($email){ | |
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; | |
if(!emailReg.test($email)){ | |
return false; | |
} else { | |
return true; | |
} | |
} | |
$(function(){ |
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
// This is called with the results from from FB.getLoginStatus(). | |
// Welcome: I am the Gatekeeper. Are you the Keymaster? | |
function theGatekeeper(response) { | |
console.log('FB Login object response:'); | |
console.log(response); | |
// FB.getLoginStatus() responds | |
if (response.status === 'connected') { | |
// logged into FB + permissions OK: You are the Keymaster | |
console.log('login OK, running '); |
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
$( "#target" ).click(function() { | |
alert( "Handler for .click() called." ); | |
}); |
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 $document = $(document), | |
$element = $('.description'), | |
className = 'dark'; | |
$document.scroll(function() { | |
$element.toggleClass(className, $document.scrollTop() >= 77); | |
}); |
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 bgArray = ['bg1.jpg', 'bg2.jpg', 'bg3.jpg', 'bg4.jpg', 'bg5.jpg']; | |
var bg = bgArray[Math.floor(Math.random() * bgArray.length)]; | |
var path = 'http://localhost/img/'; | |
$('#welcome').css('background-image', 'url('+path+bg+')'); |
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() { | |
$allVideos = $(".video iframe, .video object, .video embed"); | |
$fluidEl = $("div.video"); | |
$allVideos.each(function() { | |
$(this).attr('data-aspectRatio', this.height / this.width) | |
.removeAttr('height') | |
.removeAttr('width'); | |
}); |
NewerOlder