Skip to content

Instantly share code, notes, and snippets.

@erainey
erainey / jquery.fb-social-plugins.js
Created September 29, 2012 18:52
JavaScript: Facebook Social Plugins jQuerified
(function($) {
$.fn.xfbmlParse = function() {
FB.XFBML.parse(document.getElementById(this));
return this
};
$.fn.fbActivityFeed = function(options) {
var activityFeedSettings = {site:window.location, width:"300", height:"300", header:true, colorscheme:"light", font:"arial", border_color:"", recommendations:false, filter:" ", ref:" "};
return this.each(function() {
if(options) {
$.extend(activityFeedSettings, options)
@erainey
erainey / send_button_metrics.php
Created September 29, 2012 18:54
PHP: Facebook Send Button Metrics via Graph API
<?php
/***
Facebook Send Button Metrics via Graph API
Originally posted on Facebook Developer Blog by Zhen Fang.
Source: http://developers.facebook.com/blog/post/501
***/
$app_id = "YOUR_APP_ID";
@erainey
erainey / jquery.equalizeCols.js
Created September 29, 2012 18:06
JavaScript: jQuery Equalize Columns
(function($){
/********EQUALIZE************/
$.fn.equalizeCols = function(){
var height = 0,
reset = $.browser.msie ? "1%" : "auto";
return this
.css("height", reset)
.each(function() {
@erainey
erainey / 0_reuse_code.js
Created May 5, 2014 14:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console