Many features of JavaScript/DOM frameworks are being incorporated into the browser natively. In my last post, I talked about the Selectors API. In this one, we’ll look at classList. classList makes it much easier to work with elements and class names. With it, you can: Add, remove, and toggle classes; Retrieve the class name at [...] [Posted: 15 Aug 2011]
DOM Scripting is sometimes clunky. Consider the retrieval of elements with a particular class name. The code might look like this: var p = document.getElementsByTagName('p'); var newsitems = []; var i; for(i = 0; i < p.length; i++){ if( p[i].className == 'newsitem' ){ newsitems.push( p[i] ); } } In the example above, we’ve retrieved all [...] [Posted: 12 Aug 2011]
IP-based blocking is sometimes necessary when abuses are coming from a particular location. However, for users of proxy servers — such as Opera Turbo — blocking one IP also blocks all people using that proxy. There is a workaround, but first, some background. What is Opera Turbo? Opera Turbo is a feature of Opera Mobile [...] [Posted: 11 Aug 2011]
Whereas most entrepreneurs in Dalmo’s position develop a retching distaste for paying taxes, Dalmo doesn’t mind them much. “The tax system is good—it’s fair,” he tells me. “What we’re doing when we are paying taxes is buying a product. So the question isn’t how you pay for the product; it’s the quality of the product.” [...] [Posted: 5 Aug 2011]