What's @font-face?@font-face is for loading up and using your own custom fonts, rather than the limited set of standard system fonts already insta...
What's @font-face?@font-face is for loading up and using your own custom fonts, rather than the limited set of standard system fonts already insta...
CSS SpecificityStart at 0, add 1000 for style attribute, add 100 for each ID, add 10 for each attribute, class or pseudo-class, add 1 for each element...
The postMessage API is supported by all modern browsers including IE8. It allows windows/frames from multiple domains to communicate with each other. ...
OverviewBased on the library bootstrap model and jstree, I built the library Treeview to select a file from the file cabinet and do copy or move.Gett...
Overview Render TV list data, set the cursor focus on the item, and go on the next when pressing the Enter key. Y.TVList doesn't deal with any sty...
Why may we want to preload images?Preloading images is a great way to improve the user experience. When images are preloaded in the browser, the visit...
onLoadThe load event is a general “loading complete” signal. It is supported by many elements. For example, external SCRIPT and IMG, IFRAME trigger ...
ECMAScript 5's Function.prototype.bind is a great tool that's implemented in all modern browser JavaScript engines. It allows you to modify th...
DefinitionsPass by ValueIf the function is able to assign values to its parameters, only its local copy is assigned — that is, anything passed into a...
getAttribute("HREF") is always absoluteThe href attribute is different to other element attributes in that the value set can be relative to the contex...
Liquid PNG 8 Round CornersHTML HTML Markup<div id="wrapperDiv" class="wrapper"> <div class="top-left"></div> <div class="to...
What is z-index?The z-index property determines the stack level of an HTML element. The stack level refers to the element's position on the Z axis...
What is the XMLHttpRequest object? Creating an XMLHttpRequest object. Specifying and submitting your HTTP request to a web server. Synchronou...
There is a bug in IE (version 6 and 7) in which the clarity between window.onresize and body.onresize is muddied. This can cause quite a problem for d...
Scripting Computed StylesThe W3C standard API for determining the computed style of an element is the getComputedStyle() method of the Window object. ...
Communicate Between iFramesiFrame AttributesExample<iframe id="my-iframe" height="100%" width="100%" src="child.html" allowtransparency="true" fram...
Mouse Events onMouseDown: A mouse button has been pressed. onMouseMove: The mouse has been moved. onMouseOut: The mouse pointer has left an e...
Types of ErrorsSyntax ErrorsSyntax errors are errors in grammar and punctuation such as mismatched quotes or missed commas. These errors are caught qu...
What are cookies?Cookies are small amounts of data stored by the web browser. They allow you to store particular information about a user and retrieve...
Event Flow Event Capturing Netscape maintained that the event on element1 takes place first. This is called event capturing. The e...
Dynamic Style LoadingExamplevar HTTPUTILITY = { getStyle: function(url, callback) { var isLoaded = false; var style = document.createElem...
Comparison with XMLHttpRequest()Advantages Can request a file from anywhere on the net, not just the server your page was loaded from. Works in IE e...
Disable Text SelectionWith CSSExample<div unselectable="on"></div> /* For IE */Example.text-selection { user-select: none; -moz-user-s...
Variables and MethodsPrivate VariablesPrivate variables are declared with the var keyword inside the object, and can only be accessed by private funct...
Opacity SettingWith CSSExample.opacity { opacity: 0.5; /* For Newer Mozilla Browsers, Safari, and Opera */ -moz-opacity: 0.5 /* For Older Mozilla Br...
Working With Backgrounds in CSS 2The Background Shorthand PropertyExamplebackground: transparent url(images/image.png) left top scroll no-repeat;One i...
Specifics On Floated Elements A left-floated box will shit to the left until its leftmost margin edge (or border edge if margins are absent) touche...
Conditional CommentsSyntaxExample<!--[if condition]> HTML <![endif]-->ConditionExample<!-- Any Version of IE (typically 5, 5.5, 6, or 7...