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
$(function() { | |
var p = 'tel'; | |
var h = '1'; | |
var o = '212' | |
var n = '555' | |
var e = '1973'; | |
//activates the link if it's clicked from a phone | |
if( navigator.userAgent.match(/Android/i) || | |
navigator.userAgent.match(/webOS/i) || | |
navigator.userAgent.match(/iPhone/i) || |
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
$(function() { | |
var m = 'mail'; | |
var a = 'to'; | |
var i = '@site.com'; | |
var l = 'foo'; | |
$('li.email').replaceWith('<li><a href='+m+a+':'+l+i+'?subject=Hello%20from%20'+i+'>E-mail</a></li>'); | |
}); |
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 | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
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 imgs = document.getElementsByTagName('img'); | |
for (var i = 0; i < imgs.length; i++) { | |
imgs[i].removeAttribute('title'); | |
} |
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
/* ========================================================================== | |
animation | |
========================================================================== */ | |
@keyframes blinking { | |
from { | |
background-color: black; | |
color: #76f013; | |
} |
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 assume in this example that the URL is www.foo.com?name=bar */ | |
function getUrlVars() { | |
let vars = [], hash; | |
let hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) { | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; | |
} |
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
// this syntax needs Compass | |
@include font-face("foo", font-files("foo.woff", "foo.ttf", "foo.svg#foo"), "foo.eot", normal, normal); | |
[class^="foo-"], [class*="foo-"] { | |
font-family: 'foo'; | |
speak: none; | |
font-style: normal; | |
font-weight: normal; | |
font-variant: normal; | |
text-transform: none; |
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 method="get" action="http://www.google.com/search"> | |
<input type="text" name="q" placeholder="Search"> | |
<input type="submit" value="Google Search" class="sprite-search"> | |
<input type="checkbox" name="sitesearch" value="samplesite.com" checked > | |
</form> | |
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
// calling the sprites -- needs compass to run | |
// make sure the first part of the call matches the name of the folder | |
// inside the img folder where the separate sprite images will be located | |
$foo-layout: smart; // this is called as <folder>-layout - same goes with the following lines | |
$foo-spacing: 10px; // this doesn't seen to work when the layout is set as smart, but doesn't hurt to have it here | |
$foo-sprite-dimensions: true; // this will automatically add the dimensions of every image in the sprite | |
@import "foo/*.png"; // calls all the pngs in the folder called 'image' inside the img folder | |
@include all-foo-sprites; // it will add all the images in the sprite as classes in the compiled css | |
[class*="foo-"] { | |
display: inline-block; |
OlderNewer