Articles by category: Javascript

Javascript Image File Reader: readAsDataURL(image)

File objects may be obtained from a FileList object returned as a result of a user selecting files using the element, from a drag and drop operation's DataTransfer object, or from the mozGetAsFile() API on an HTMLCanvasElement.

Sticky Header on Scroll with CSS, Javascript and RAF

Having a fixed navigation bar which is always visible to the viewer is a nice feature which gives quick access to the site content and search engine without the need to scroll back to the top of the page. In this article an example is provided using requestAnimationFrame(RAF).

Select text inside an HTML element with Javascript and a CSS class

A native Javascript function to select text in HTML blocks using a CSS class selector. It is also possible to modify the select style with CSS and add a CSS3 specific cursor. An example document is provided.