Posts Tagged ‘javascript’
Calculate text width and height with JavaScript
By David Pratt / Tags: css, javascript, ui / No Comments » / Published: 22-04-10
A tutorial that shows you how to measure the height and width of a text element using JavaScript.
Always cache the length property in for loops when using JavaScript
By David Pratt / Tags: javascript, performance, recursion / No Comments » / Published: 26-01-10
Well, you don’t have to, but it helps a smidgen when it comes to performance…
Using the logical OR operator in setting variables
By David Pratt / Tags: javascript / 2 Comments » / Published: 11-01-10
A technique that sets a variable by testing the result of the logical OR operator based on the existence of the two conditions.
Using a function’s arguments array in JavaScript
By David Pratt / Tags: function, javascript / No Comments » / Published: 29-11-09
A tutorial that explains how to access a functions arguments array.
Debugging JavaScript the easy way
By David Pratt / Tags: debugging, javascript / 1 Comment » / Published: 21-11-09
A function that tests for the existence of the console.log method, and if it doesn’t exist, instead calls alert(). Handy when you’re testing in different browsers that don’t all have Firebug installed.
Subscribe via RSS
Twitter