Tutorials Page 122
Create xkcd-Style Comics with Comix
Everyone loves the epic comic xkcd. These comics aren't usually masterclasses of artwork but expressions of whit, usually of a tech-related subject. I've always thought I could eventually create witty comics but never had the illustration skills to bring them to fruition. Luckily an incredible...
Detect Unmatched CSS Selectors with Helium
One thing I can't stand is extra code. Whether it's an extra CSS or JavaScript file that's been included by the page, bloated HTML, or unoptimized images, we're making our millions of of desktop and mobile visitors pay for our laziness and mistakes. A great tool...
Create WordPress Shortcodes
WordPress shortcodes are super handy, especially when handing off a WordPress-based website to a client. The alternative to using shortcodes is creating complicated templates, and even then, you cannot adequately replace what shortcodes can do. I recently needed to implement a new...
Override WordPress URL
When I migrated my website between Media Temple servers, I wanted to manually test the site to ensure no server configuration differences between the server were bricking the site. The obvious problem I would encounter is that links would be broken because the site wasn't...
parseInt and Radix
Everyone knows that the parseInt function within JavaScript turns your decimal number or string into a rounded integer.
parseInt
turns 10.937 into 10, 0.2 into 0, and "someValue" intoNaN
. If you useparseInt
without a radix, however, you'll receive a warning that no radix has...Hide the Admin Bar in WordPress
WordPress automatically injects an admin toolbar at the top of the page for logged in users. This bar is really an annoyance to me because it slightly throws off my theme design and I never need the toolbar for anything. Here's a snippet of code which...
CSS @supports
Feature detection via JavaScript is a client side best practice and for all the right reasons, but unfortunately that same functionality hasn't been available within CSS. What we end up doing is repeating the same properties multiple times with each browser prefix. Yuck. Another thing we...
Get Pseudo-Element Properties with JavaScript
CSS pseudo-elements are incredibly useful -- they allow us to create CSS triangles for tooltips and perform a number of other simple tasks while preventing the need for additional HTML elements. To this point, these pseudo-element CSS properties have been unreachable by JavaScript but now...
Firefox OS Source Leaked!!!
The complete, commented source code for Mozilla's new Firefox OS effort has been leaked!! In what can only be a massive oversight on Mozilla's part, the holy trinity of Firefox OS (codenamed Boot2Gecko), Gonk (the Linux kernel), Gecko (the renderer), and
Convert arguments to Array
The
arguments
object thats automatically available within functions can be a source of confusion for some people; it's kind of an array but it's kinda not. JavaScript is awesome in that you can pass any number ofarguments
to a function, and oftentimes developers need to...