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
$('html, body').animate({scrollTop: $(document).height()}, 'slow'); |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>World Cup 2010 Countdown Timer</title> | |
</head> | |
<body> | |
<div id="worldcup_countdown_time"> </div> | |
<script src="wc10.js" type="text/javascript" charset="utf-8"></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
<div class="content"><img src="http://placehold.it/250x250" /></div> | |
<style type="text/css"> | |
img { | |
border-radius: 50%; | |
} | |
.o-border-radius { | |
display: block; | |
border-radius: 50%; | |
overflow: hidden; |
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> | |
<title>index</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<link type="text/css" rel="stylesheet" href="css/style.css" /> | |
<link type="text/css" rel="stylesheet" href="fonts/fonts.css" /> |
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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
<?php | |
// form parser, replaces all fields with their values | |
$param['fields'] = $_POST; // almost | |
$message = $form['text']; // get the initial form HTML from somewhere | |
$message = str_replace("<form", "<div", $message); | |
$message = str_replace("</form", "</div", $message); | |
$message = preg_replace("#<input([^>]*)type=['\"]?submit['\"]?([^>]*)>#u", "", $message); | |
foreach ($param['fields'] as $key => $value) { | |
$message = preg_replace("#<input([^>]*)name=['\"]".preg_quote($key)."['\"]([^>]*)>#Uis", "<kbd>".htmlStripSlashes($value)."</kbd>", $message); | |
$message = preg_replace("#<select([^>]*)name=['\"]?".preg_quote($key)."['\"]?([^>]*)>(.*?)<\/select>#is", "<br><kbd>".htmlStripSlashes($value)."</kbd><br>", $message); |
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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
if ($.browser.msie && (parseInt($.browser.version) < 9)) { | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
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
window.scrollTo("0", $(".contactForm").position().top); |
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
<input name="Phone" value="Enter your phone" type="text" onfocus="if (this.value=='Enter your phone') {this.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
// by Alex Karpov | |
function prepare_alias(val) { | |
val=val; | |
if (val!="") { | |
var result = val.replace(/ /g, "-"); | |
result = result.replace(/[^a-zA-Z0-9_-]+/g, ''); | |
result = result.replace(/^[-|_]*/g,''); | |
result = result.replace(/[-|_]*$/g,''); | |
result = result.replace(/[-]+/g,'-'); | |
result = result.toLowerCase(); |