Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// The progress bar in article titles. | |
// Only do this on article pages. | |
if($('#page').hasClass('article')){ | |
$('#title-progress-bar-container').tnrProgressBar({ maxWidthElement: $('#main') }); | |
// The sticky header progress bar. | |
if($(window).width() == $('#fixed-header').width()){ // iPhone mode is full width. | |
$('#fixed-header-progress-bar-container').tnrProgressBar({ | |
maxWidthOffset: -3, | |
maxWidthElement: $(window) | |
}); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
var Book = function(name) { | |
this.name = name; | |
this.demo = '123'; | |
} | |
var Method = function() { | |
// 继承了 Book 的静态属性 this.demo = '123' | |
Book.apply(this, arguments); | |
} |
A list of Sketch plugins hosted at GitHub, in no particular order.
<?php | |
/** | |
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or | |
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below). | |
* | |
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/ | |
* | |
* INSTRUCTIONS: | |
* 1. Edit the variables below | |
* 2. Upload this script to your server somewhere it can be publicly accessed |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent