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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS Nav thing</title> | |
<style type='text/css'> | |
input { | |
display: none; | |
} | |
#link1:checked ~ #content1, |
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 updateAvgFps = (function (fpsElm) { | |
var fpsMap = [0,0,0,0,0,0,0,0,0,0], | |
avgFps = 0, | |
lastTime = new Date().getTime(), | |
drawCount = 0; | |
if (! fpsElm) { | |
fpsElm = document.createElement("div"); | |
fpsElm.style.position = "absolute"; | |
fpsElm.style.right = "5px"; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Tasky</title> | |
<style> | |
</style> | |
</head> |
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 a = ["a", "b"] | |
> a.indexOf("a") | |
0 | |
> a.indexOf("b") | |
1 | |
> a.indexOf("c") | |
-1 | |
> ~a.indexOf("a") | |
-1 | |
> ~a.indexOf("c") |
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
// put in head right after jquery | |
(function () { | |
function check ($e) { | |
if ($e.attr("src") == "") { | |
console.log($e) | |
} | |
} | |
$(window).bind("DOMNodeInserted", function (e) { |
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 that uses modernizr to detect css3 transition support and listens for transitionEnd or calls back right away if transitions are not supported | |
// basically send this a cb and it will be run on transitionEnd or right away if transitionEnd is not supported | |
jQuery.fn.cssTransitionEnd = function (cb) { | |
// lifted from http://www.modernizr.com/docs/ | |
var transEndEventNames = { | |
'WebkitTransition' : 'webkitTransitionEnd', | |
'MozTransition' : 'transitionend', | |
'OTransition' : 'oTransitionEnd', |
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
return View.extend({ | |
initialize: function () { | |
this.el.attr("draggable", "true") | |
this.el.bind("dragstart", _.bind(this._dragStartEvent, this)) | |
}, | |
_dragStartEvent: function (e) { | |
var data | |
if (e.originalEvent) e = e.originalEvent | |
e.dataTransfer.effectAllowed = "copy" // default to copy |
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
There is no way to have the html editor open and not be inspecting. - because of this It is very hard to use, in order to see the whole page with no dimming I have to completely close the inspector | |
Bug: 2 tabs next to each other both with html inspector open, one tab without to the right, using keyboard shortcut (cmd-shift-[) quickly switch 2 tabs over. | |
Can't hover over htmelements in inspector to highlight it in the dom, have to click. | |
CSS changes don't update until you click off, would prefer on keyup. | |
no css attribute autocomplete |
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
// use this as a starting point when adding a view | |
define([ | |
'text!views/-------.html', | |
'views/View' | |
], | |
function ( | |
template, | |
View |
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
;(function () { | |
var Modernizr | |
// run cb when the next animation is complate (or right away if there is no animation support) | |
var cssTransitionEnd = function (cb) { | |
var $self = $(this) | |
var transEndEventNames = { | |
'WebkitTransition' : 'webkitTransitionEnd', | |
'MozTransition' : 'transitionend', |
OlderNewer