Kevinleary.net, LLC.

Blog

Sensible approaches to build and maintain custom WordPress websites.

jQuery fadeIn & fadeOut Problems in Internet Explorer

I’ve noticed that when I use the jQuery .fadeIn() or .fadeOut() method I see ugly pixelated text in Internet Explorer after the animation has completed. This seems to be related to an issue with an IE specific style filter called clearType. To solve the problem, you need to remove the clearType filter after your jQuery…

Highlight the Current Page with jQuery, CSS & PHP

Here’s a common web development scenario: How do we highlight the current page in a navigation seamlessly and dynamically? The answer is jQuery. See a Live Demo My recipe for this common scenario involves a mixture of CSS and JavaScript with a dash of jQuery. HTML <ul id=”navigation”> <li><a href=”about-us.html”>about us</a></li> <li><a href=”our-products.html”>our products</a></li> <li><a…

jQuery Mailto Links Plugin

You may want to check out the reCAPTCHA Mail Hide service, it provides better protection than the method described here. The jQuery Mailto Plugin will safely protect your mailto: anchors links with jQuery. Features include: REGEX replacement Updated status message Simplified usage using a class rather than the rel attribute to target mailto: links Leaner…

Form Input Default Values With The jQuery valueFx() Plugin

Have you ever wanted to provide forms with default values or examples to improve user experience? Here’s how you can do it in an easy, re-usable way using a jQuery plugin called valueFx. This is a more agile, re-usable version of the Focus & Blur effects I’ve previously posted about. This can be used on…

True Seperation of Presentation & Content with XML

Web standards books praise the idea of separating presentation from content. Unfortunately doing so is harder said than done in the professional world. When I begin working on a re-design I usually find myself spending countless hours re-formatting content, so what’s the point? If a client wants specific information laid out as an unordered list…

Testing Page Load Speed With Firebug

The more I find myself using JavaScript, the more I begin to worry about the weight of my pages. With the use of jQuery, much that was tradiotionally server side can now be handled on the client side with JavaScript. So how does one go about measuring the time it takes to load there website?…

External JavaScript on Demand With $.getScript()

I find myself using JavaScript more and more often in my work. As work on a particular site grows, I find that too many external scripts begin to pile up in the <head> section of my document, eventually effecting performance. Thanks to jQuery’s $.getScript method, I’ve found an elegant solution to this problem. Think of…

AJAX, XML and Internet Explorer

While working on the KMC Partners website I stumbled upon a cross browser issue using jQuery’s AJAX $.get() method to load and parse XML data. It seems that if you are using AJAX to load an XML file with UTF-8 character encoding, it will fail in both Internet Explorer 6.0 and 7.0. However, if you…

Working With Dreamweaver Site Files (.STE)

When connecting to a new project via FTP I will occasionally come across .STE (Dreamweaver Site File) files being used as a means to store FTP username and password information. The FTP password is always encrypted in these files. This causes problems because I do not use Dreamweaver to build websites. Even worse, what if…

jQuery Safer Mailto Links Plugin

There is a newer version of this post available called jQuery Mailto Links Plugin: Version 1.1 Recently I realized that jQuery plugins are the way to go for building re-usable, modular code snippets. As a result I have revisited the jQuery Safe Mailto’s function, building a jQuery Plugin to replace it. Working Example info[at]kevinleary[dot]net All…

Better Web Design Workflow using OS X Keyboard Shortcuts

Taking advantage of shortcut keys can save valuable time, speed up your workflow and increase productivity. I’ve put together a list of links to shortcuts and cheat sheets for the various applications and tools I frequently encounter. Please let me know if I’m missing out on anything extraordinary (because I probably am). Mac OS X…

Highlight Current WordPress Post

I came across a dilemma recently. I wanted to highlight the WordPress post that is currently shown in my sidebar menu. I couldn’t find a sound solution for this, so here’s what I came up with. Using JavaScript and jQuery 1.2.3 I was able to highlight the current post in the WordPress navigation, or sidebar…

Safe MailTo’s With jQuery

There is a newer version of this post available called jQuery Mailto Links Plugin: Version 1.1 Here’s a small snippet I created on the job, I thought some people may find it useful. It was built using jQuery version 1.2.3. The purpose of this snippet is reject those nasty spam bots from stealing your (or…

Search Field Focus & Blur Effects with jQuery

This article will show you how to use the jQuery JavaScript library to create a search field displaying a value such as “Enter your search terms here.” When a user clicks into that field the value will disappear, allowing the user to enter there search terms. If a user clicks out of that search field without entering anything, the default value will return to the field.