Skip to content

Instantly share code, notes, and snippets.

config.init({
meta: {
title: 'Premier Dental Implant Practices',
name: "Christopher Webb",
homepage: 'http://conspirator.co',
twitter: 'conspirator',
banner: '/* \n' +
' * \tAuthor:\t\t{{meta.name}}\n' +
' * \tWebsite:\t{{meta.homepage}}\n' +
' * \tTwitter:\thttp://twitter.com/{{meta.twitter}}\n' +
@conspirator
conspirator / Facebook Like
Created October 3, 2011 15:22
I 'like' Facebook and its Like button. I 'dislike' the comment box that flies out when you click it. Here's a quick and easy fix. Boom!
/* hide the like button count */
.fb_edge_widget_with_comment iframe {
width:52px !important;
}
/* hide that pesky comment box */
span.fb_edge_comment_widget.fb_iframe_widget iframe {
display: none;
}
@conspirator
conspirator / Simplified HTML5 pushState
Created February 3, 2011 19:21
Just call hijack.init(); on document.ready.
var documentPathname = document.location.pathname,
hijack = {
history: $('html').hasClass('history'),
currentLocation: documentPathname,
firstLoad: 1,
init: function(){
var context = this;
// Normal link clicks
$('a').live('click',function(e){
context.firstLoad = 0;
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(x){
this.firstName = x && x.firstName ? x.firstName : "Barack";
this.lastName = x && x.lastName ? x.lastName : "Obama";
<script type="text/javascript">
Person.prototype.setPerson = function(x){
this.firstName = x.firstName;
this.lastName = x.lastName;
this.job = x.job;
}
function init() {
var wife = new Person();
wife.setPerson({
<script type="text/javascript">
function init() {
var me = new Person();
me.setFirstName('Christopher');
me.setLastName('Webb');
me.setJob('Developer');
me.writePerson(1);
var pooh = me;
pooh.setLastName('Robbin');
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(){
this.firstName = "Barack";
this.lastName = "Obama";
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
var Person = function(){
this.firstName = "Barack";
this.lastName = "Obama";
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>OOJS Test Page</title>
<script type="text/javascript">
function init() {
alert('Do work!');
}
<script type="text/javascript">
var Person = function(){
this.firstName = "Barack";
this.lastName = "Obama";
this.job = "President";
}
</script>