Posted March 10th, 2009 by George Huger
This post highlights a difference between jQuery 1.2 and later in how relative values are handled, which I recently discovered when upgrading a site from jQuery 1.2 to the new 1.3. If you’re about to do the same, or have recently broken your site after upgrading and don’t know why, this post is for you. It will be easier to explain with an example, so here’s how the problem manifested for us:
On our main website we use jQuery to slide the pages into view when a user clicks on a navigation link. This is a variation of the “Coda Slider”, named because it mimics the website for Panic software’s Coda editor. In a nutshell, we have a div which acts as a viewport (we’ll call it #viewport), with another div inside which contains the pages (which we’ll call #slideContainer). #viewport has its position property set to relative, and its child, #slideContainer, has its position set to absolute. So when we increase or decrease the value of #slideContainer’s left property, it will slide right or left respectively to reveal new pages. Here’s an example:
Continue reading “Relative Offsets Are Handled Differently Between Versions of jQuery” »
Tags: animate
Posted in Javascript, jQuery
Posted March 10th, 2009 by George Huger
After upgrading a friend’s blog to Wordpress 2.7 we started noticing his pageview numbers in AWStats going through the roof, without a corresponding increase in visitors. Here’s a screenshot:

Google Analytics was showing normal pageview numbers, so we knew something was amiss. When we looked at the most viewed pages in awstats, it became obvious:

AWStats has always counted pageviews on the Wordpress backend, but compared to the total pageviews the impact was negligible. However, now that Wordpress 2.7 makes so many AJAX calls to admin-ajax.php (primarily for saving drafts), we must exclude these pageviews from our reports to leave meaningful data. Thankfully its very easy.
Continue reading “Exclude Wordpress’ Admin URLs from your AWStats Reports” »
Tags: awstats
Posted in Analytics, Wordpress
Posted March 5th, 2009 by George Huger
Nothing exposes the gap between web apps and desktop applications more than plain HTML forms. Fortunately, by leveraging Javascript we can start to close this gap while maintaining a consistent experience for users using screen readers and old browsers.
We’ve identified 10 ways in which normal HTML forms fall short, and dug up the Javascript and CSS code you’ll need to fix them. Although the best enhancements are so intuitive as to be unnoticed, rest assured your visitors would thank you if they knew.
Note: Many of the solutions in this list depend on jQuery, our javascript framework of choice.
Continue reading “10 Javascript Tricks for Better Forms” »
Tags: combo box, forms, progress bars
Posted in Javascript, Web Development, jQuery