Some tasks utilize the watch to trigger an event, ie: live reload. With Grunt
v0.3, those tasks on first run would create a variable, ie servers
. Then
subsequently ran by the watch task would check if the variable exists and then
use it. Since the new watch spawns tasks, this is no longer possible.
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
//http://miketaylr.com/code/html5-forms-ui-support.html | |
testSupport: function(){ | |
var frowny = ":("; //no support frowny! | |
var inputs = $('input'); | |
inputs.each(function(){ | |
var $this = $(this); | |
$this.val(frowny) | |
.closest('td').next().text( |
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
/* | |
* mediaquery function - test whether a CSS media type or query applies | |
* author: Scott Jehl | |
* Copyright (c) 2010 Filament Group, Inc | |
* MIT license | |
* Developed as a feature of the EnhanceJS Framework (enhancejs.googlecode.com) | |
* thx to: | |
- phpied.com/dynamic-script-and-style-elements-in-ie for inner css text trick | |
- @paul_irish for fakeBody trick | |
*/ |
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
/* | |
* media.matchMedium()- test whether a CSS media type or media query applies | |
* primary author: Scott Jehl | |
* Copyright (c) 2010 Filament Group, Inc | |
* MIT license | |
* adapted by Paul Irish to use the matchMedium API | |
* http://www.w3.org/TR/cssom-view/#media | |
* Doesn't implement media.type as there's no way for crossbrowser property | |
* getters. instead of media.type == 'tv' just use media.matchMedium('tv') |
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
Modernizr | |
.addTest('iframe', function() { | |
return window.top.location != window.location; | |
}) | |
.addTest('facebook', function() { | |
return !! ~ location.href.indexOf( 'fb_sig_in_iframe=1' ); | |
}); |
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
// jQuery plugin based on .load() for use with innerShiv | |
// http://jdbartlett.github.com/innershiv for more info | |
// $('selector').loadShiv('example.html selector'); | |
jQuery.fn.loadShiv = function (url, params, callback) { | |
var off, selector, self, type; | |
if (!this.length || typeof url !== 'string') { | |
return this; | |
} |
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
var cat = {}; | |
/** | |
* cat.NewsBox | |
* Retrieves news from Google | |
*/ | |
cat.NewsBox = (function(){ | |
function NewsBox(searchTerm, injectFn) { | |
this.searchTerm = searchTerm; |
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
sudo npm install -g coffee-script |
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
.arrowgasm(@position: top, @size : "4px", @background-color : #88b7d5, @border-width: "2px", @border-color : #c2e1f5, @arrowClass : "arrow_box"){ | |
(~".@{arrowClass}") { | |
position: relative; | |
background: @background-color; | |
border: @size solid @border-color; | |
} | |
(~".@{arrowClass}:after"), (~".@{arrowClass}:before") { | |
bottom: 100%; | |
border: solid transparent; |
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 { | |
/* iOS: Actions without the gray overlay */ | |
-webkit-tap-highlight-color: rgba(0,0,0,0); | |
/* iOS: Remove the actions panel */ | |
-webkit-touch-callout: none; | |
} |
OlderNewer