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
$(document).ready(function(){ | |
$(".thumbs img").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads | |
$(".thumbs img").hover(function(){ | |
$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover | |
},function(){ | |
$(this).fadeTo("slow", 0.6); // This should set the opacity back to 60% on mouseout | |
}); | |
}); |
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
$(document).ready(function() { | |
$("a.topLink").click(function() { | |
$("html, body").animate({ | |
scrollTop: $($(this).attr("href")).offset().top + "px" | |
}, { | |
duration: 500, | |
easing: "swing" | |
}); | |
return false; | |
}); |
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
$('a[@rel$='external']').click(function(){ | |
this.target = "_blank"; | |
}); | |
/* | |
Usage: | |
<a href="http://www.catswhocode.com" rel="external">catswhocode.com</a> | |
*/ | |
//http://snipplr.com/view/315/-jquery--target-blank-links/ |
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 cache = []; | |
// Arguments are image paths relative to the current page. | |
$.preLoadImages = function() { | |
var args_len = arguments.length; | |
for (var i = args_len; i--;) { | |
var cacheImage = document.createElement('img'); | |
cacheImage.src = arguments[i]; | |
cache.push(cacheImage); | |
} |
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
ul { | |
list-style: none; | |
padding:0; | |
margin:0; | |
} | |
li { | |
padding-left: 1em; | |
text-indent: -.7em; | |
} |
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>Meetup Groups by Member ID</title> | |
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$.getJSON("https://api.meetup.com/2/groups?callback=?&sign=true&member_id=MEMBER_ID&page=50&api&key=API_KEY&only=name,link", | |
function (data) { | |
var htmlString = ""; |
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
The first step is to paste the following code into your functions.php file: | |
function pdflink($attr, $content) { | |
return '<a class="pdf" href="http://docs.google.com/viewer?url=' . $attr['href'] . '">'.$content.'</a>'; | |
} | |
add_shortcode('pdf', 'pdflink'); | |
Once you saved the file, you'll be able to use the shortcode on your posts and page. Here is the syntax: | |
[pdf href="http://yoursite.com/linktoyour/file.pdf"]View PDF[/pdf] |
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
/* Times New Roman-based stack */ | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
/* Modern Georgia-based serif stack */ | |
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; | |
/* Traditional Garamond-based serif stack */ | |
font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif; | |
/* Helvetica/Arial-based sans serif stack */ |
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
Open default mail program, create new message with the TO field already filled out. | |
<a href="mailto:someone@yoursite.com">Email Us</a> | |
Adding a subject | |
Open default mail program, create new message with the TO and SUBJECT field already filled out. Essentially we are adding the parameter subject to the href value. | |
Spaces in the subject will probably work OK, but to be super-extra sure, you can replace spaces with "%20". | |
<a href="mailto:someone@yoursite.com?subject=Mail from Our Site">Email Us</a> |