This file contains hidden or 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
"Ode to Paul Irish" | |
There once was a jQuery master from Boston, | |
whose soul-piercing eyes you could get lost in. | |
He gave some cool talks, | |
which knocked off my socks, | |
and now he's the daddy of my children. |
This file contains hidden or 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
HTML | |
==== | |
<p>jQuery BBQ enables simple, yet powerful bookmarkable #hash history via a cross-browser window.onhashchange event. In addition, jQuery BBQ provides a full jQuery.deparam() method, along with both fragment and query string parse and merge utility methods.</p> | |
<p><strong>This plugin and the <a href="http://benalman.com/projects/jquery-urlinternal-plugin/">jQuery urlInternal</a> plugin supersede the URL Utils plugin.</strong></p> | |
<ul> | |
<li>Release v1.0.2</li> | |
<li>Tested with jQuery 1.3.2 and jQuery 1.4pre in Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome, Opera 9.6-10.</li> |
This file contains hidden or 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
<!-- | |
My "generic" HTML structure (used in benalman.com and others) | |
An array of main sections: | |
page = [ { header: [] }, { content:[] }, ... ]; | |
Bodies are pushed onto each of those, which are all iterated over | |
to form this structure: |
This file contains hidden or 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
<mt:SetVarBlock name="current_page_body"> | |
<mt:Unless name="current_page_category_is_date"> | |
<mt:SetVar name="_sort_by" value="title"> | |
<mt:SetVar name="_sort_order" value="ascend"> | |
</mt:Unless> | |
<mt:Entries tags="NOT (@hidden OR @nonav)" lastn="$int_category_recent_entries_count" sort_by="$_sort_by" sort_order="$_sort_order"> | |
<mt:Var name="entry_summary"> | |
<mt:Var name="hr"> | |
</mt:Entries> | |
<mt:SetVarBlock name="more_recent_entries"> |
This file contains hidden or 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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>oops?</title> | |
<script type="text/javascript" src="http://benalman.com/code/jquery/dist/jquery.js"></script> | |
<script type="text/javascript" language="javascript"> | |
<!-- |
This file contains hidden or 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
/*! | |
* jQuery ie6ize: Emulate IE-6 rendering - 11/13/2009 | |
* http://mankzblog.wordpress.com/2009/11/13/ie6-frame-to-battle-chrome-frame/ | |
* | |
* Created by Mats Bryntse | |
* | |
* Plugin-ified by "Cowboy" Ben Alman | |
* http://benalman.com/ | |
* | |
* Bookmarklet version: |
This file contains hidden or 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 obj = { | |
prop: 'foo', | |
method1: function(){ return this.prop; } | |
}; | |
obj.method2 = function(){ return this.method1(); }; | |
function bindify( obj, name, fn ) { | |
obj[ name ] = function(){ | |
return fn.apply( obj, arguments ); |
This file contains hidden or 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
// ============================== // | |
// 1 | |
// ============================== // | |
// create | |
var q = $.qq({ | |
delay: 100, | |
oneach: function( item ) { console.log( item ); } | |
}); |
This file contains hidden or 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
// Try this in the Firebug console on: | |
// http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/ | |
// | |
// Screenshot: | |
// http://benalman.com/grab/2535b7.png | |
(function($){ | |
function get_route() { | |
var hash = $.param.fragment(), |
This file contains hidden or 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
/*! | |
* JavaScript domReplace - v1.0pre - 11/18/2009 | |
* http://benalman.com/projects/javascript-dom-replace/ | |
* | |
* Copyright (c) 2009 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
*/ | |
// jQuery not required: |