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
| // ============================================================================= | |
| // Modernizr mixin | |
| // | |
| // Table of contents: | |
| // 1. Modernizr mixin | |
| // 1.1 Generate placholder name and selectors | |
| // 1.2 Define placholder and print @content | |
| // 1.3 Define feature selector and extend the placeholder | |
| // 2. Aliases | |
| // 2.1 Yep alias |
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
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; |
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 Tiny Pub/Sub - v0.7 - 10/27/2011 | |
| * http://benalman.com/ | |
| * Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */ | |
| (function($) { | |
| var o = $({}); | |
| $.subscribe = function() { | |
| o.on.apply(o, 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Hash Switcher</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
| <style> | |
| .page { | |
| display: none; | |
| } |
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
| // AJAX pagination support with will_paginate and jQuery; history fix via jQuery-BBQ | |
| baseurl = location.protocol + '//' + location.host + location.pathname; | |
| $(function() { | |
| $('.pagination a').live('click', function(e) { | |
| params = $.deparam.querystring(this.href); | |
| new_url = $.param.fragment(baseurl, params, 2); | |
| $(this).parent('.pagination').append("<img src='/images/spinner.gif' class='spinner' />"); // show loading spinner | |
| location.hash = $.param.fragment( new_url ); // set the new hash, which will trigger the hashchange event |
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
| // Make jQuery UI tabs pick the selected tab from the URL hash, | |
| // and set the selected tab id as the hash. | |
| // | |
| // By Henrik Nyh <http://henrik.nyh.se> 2009-09-10 under the MIT License. | |
| // Based on code by Mark Yoon: http://articles.rootsmith.ca/mod_python/how-to-make-jquery-ui-tabs-linkable-or-bookmarkable#comment-10188 | |
| $('#foo').tabs(); | |
| $('.tabs').each(function() { |