Combining Google’s re(no)CAPTCHA and jQuery Validate

As I've mentioned before, we use jQuery Validate on most sites that we build at work. When validating forms it's important to do more than just verify that the fields contain values that you'd expect. We should also be testing to verify that the form isn't spam with a server-side solution like Akismet. That works great… Continue reading Combining Google’s re(no)CAPTCHA and jQuery Validate

Sorting alphabetically with mixed case letters

When using JavaScript's .sort() to sort an array of objects alphabetically, remember to set each string to lowercase or uppercase before you compare it. This will correct the priority that JavaScript gives capitalized letters over lowercase letters. For example, instead of: var defaultParent = $('.default-sort'); var defaultItems = defaultParent.children('li'); defaultItems.sort(function(a, b) { x = a.getAttribute('data-sort'); y… Continue reading Sorting alphabetically with mixed case letters

Variable CSS Perspectives and Transform-Functions

When working with 3D animations with CSS, one thing that is rarely mentioned is that CSS3's perspective property is largely linked to the element height. This is likely because it normally wouldn't be an issue. Applying perspective to an element wrapping a transformed element or group of transformed elements forces the elements to behave similarly and all 'start' from… Continue reading Variable CSS Perspectives and Transform-Functions

Explaining the Hex Color Format (and how to convert to it)

It's actually easier than it sounds, and once you understand the basics you can likely do most conversions mentally. The goal is to take a color in the RGB format, 3 groups of integers 3 digits long (eg: 111, 222, 123) and convert it to the hexadecimal equivalent. Hexadecimal is essentially a different way to… Continue reading Explaining the Hex Color Format (and how to convert to it)