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
/* | |
- get the third list item (hint: eq()) | |
- change its color to red | |
- change the color of the rest of the list items to blue | |
- *without doing another selection*, find the div.module | |
and remove the class "module" | |
$(document).ready(function() { | |
var $li = $('li').eq(2); |
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
$(document).ready(function() { | |
// move the slideshow up to the top | |
var $slideshow = $('#hero'); | |
$slideshow.prependTo('#main'); | |
// create the counter element | |
var $counter = $('<div/>') | |
.insertAfter($slideshow); | |
// get the items and figure out |
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
$(document).ready(function() { | |
var $specials = $('#specials'); | |
$specials.find('li.buttons').remove(); | |
var cachedResponse = null; | |
var $details = $('<div/>').appendTo($specials); | |
var handleResponse = function(specials, val) { | |
var daySpecial = specials[val]; |
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 starsSelected = dojo.some(this.stars, function(el) { | |
return (dojo.query('input', el)[0].value > 0); | |
}); |
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
dojo.provide('foo._Scheduler'); | |
dojo.declare('foo._Scheduler', null, { | |
constructor : function() { | |
dojo.subscribe('/user/inactive', this, '_pause'); | |
dojo.subscribe('/user/active', this, '_restart'); | |
dojo.subscribe('/scheduler/clear', this, '_clear'); | |
this.intervals = []; | |
this.requests = []; |
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
dojo.provide('hitpost.layer'); | |
dojo.require('plugd.trigger'); | |
dojo.require('hitpost.Messaging'); | |
dojo.require('hitpost.Forms'); | |
dojo.require('hitpost.Search'); | |
dojo.require('hitpost.ActivityMonitor'); | |
dojo.require('hitpost.Auth'); |
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
dojo.provide('hitpost.Graph'); | |
dojo.declare('hitpost.Graph', null, { | |
min : 0, | |
max : 6, | |
wait : 500, | |
constructor : function(domNode, animate) { | |
if (!domNode) { return; } | |
this.animate = animate || false; |
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 foo = [ 1, 2, 3, { a : 'b' } ]; | |
var bar = foo[foo.length-1]; | |
bar.c = 'bar'; | |
console.log(foo); // [ 1, 2, 3, { a : 'b', c : 'bar' } ] |
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
/*! | |
* @projectDescription Slider class for iPhone web applications | |
* | |
* @author Rebecca Murphey rebecca@rebeccamurphey.com | |
* @license MIT http://www.opensource.org/licenses/mit-license.php | |
*/ | |
var Slider = function(config) { | |
this.sections = config.sections; |
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
egrep -r '(png|gif|jpg)' * | sed "s/.*url('\([^']*\).*/\1/" |