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
$("form *").hover(function () { | |
$(this).focus(); | |
}); |
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
// easy SlidesJs gallery adding to wordpress page | |
function slides_from_post($atts) { | |
extract(shortcode_atts(array( | |
"exclude" => '' // parameter to exclude the images you don't want to show | |
), $atts)); | |
; | |
$tmp = explode(", ", $exclude); | |
if ($tmp) { | |
foreach ($tmp as $tmpItem) { |
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
// paste this into console | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); | |
script.setAttribute('src', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js'); | |
document.body.appendChild(script); | |
//typeof $ |
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
// 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(); |
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
<input name="Phone" value="Enter your phone" type="text" onfocus="if (this.value=='Enter your phone') {this.value=''}" /> |
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
window.scrollTo("0", $(".contactForm").position().top); |
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
// 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 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 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 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" /> |
OlderNewer