jQuery Sticky Sidebar

This is something I wrote in a few hours so thought I’d share it with the world. It mimics the sidebar UX seen on Apple and Amazons purchase flows. I tried to keep this as simple as possible. There are two states the plugin determines – Sticky and non-Sticky. When the Sidebar is sticky its [...]

jQuery Cycle and Fullscreen

jQuery Cycle is an excellent plugin and the most extensible jquery plugin I’ve seen thus far. It works surprisingly well and is very accommodating to all sorts of external html/css setups. However there is an itch to scratch when it comes to fullscreen sliding. The Cycle plugin doesn’t quite support this well enough. Fortunately the [...]

Customizing the WordPress Admin Interface

Six Revisions have an excellent post on how to customize the WordPress admin area. However I was looking also at a way of removing the Plugin Editor menu and noticed you can’t remove it like you do with the Theme Editor menu because it’s not added via an action. So I added this to my [...]

HowTo: Revert local changes in Git

Found this answer on Stack Overflow very useful, so thought I’d share it here: If you want to revert changes made to your working copy, do this: git checkout . If you want to revert changes made to the index (i.e., that you have added), do this: git reset If you want to revert a [...]

How to get Fancybox 1.3.1 to stay put!

I recently had a need to use a Fixed position overlay and found that Fancybox breaks if I set #fancybox-wrap to position:fixed. I believe the centerOnScroll option was supposed to solve this problem by recalculating the absolute position of #fancybox-wrap upon scrolling. The problem with this approach is that the overlay ‘shudders’ or ‘feels jumpy’ [...]

HTML5 Placeholders

HTML5 adds a new attribute to most form elements called a placeholder. Its purpose is to add a short hint inside data entry points that disappear on focus. This type of interaction isn’t new but is new to HTML as of version 5. For this reason not all browsers have implemented this feature. Try it [...]

jQuery: Textarea maxlength

Being able to restrict the maximum length of user input from the interface directly is very convenient and practical in use. We do this a lot with input elements. Unfortunately textarea elements do not natively support the maxlength attribute. This attribute was finally added in HTML5 but at the time of writing Chrome is the [...]

Tip: getting values from an options list

So, if you’ve ever converted an options list into a single array of values you might have intuitively done this: var select = $(‘#mySelectElement’)[0]; var values = new Array(); for (var i=0; i < select.length; i++) { values.push(select.options[i].value); } Pretty boring aye? There is a snazzier (is that a word?) alternative, which is to use [...]

Happy Birthday Google Chrome!

Wow, it’s been a year already? Time certainly flies when you’re having fun! It seems the Google Chrome team have been hard at work! They’ve finally made a version of Google Chrome for Mac and Linux which you could download from the Dev channel. Had a quick test and found Print and Application shortcuts haven’t [...]

Zend Server CE and Snow Leopard Problem

There’s a compatibility issue with the Java Bridge in Zend Server CE which results in failure of the ZendServer admin interface. A temporary fix could be found at http://forums.zend.com/viewtopic.php?f=44&t=1115 I found this out the hard way – reinstalled and digged the internals before realizing it was a compatibility issue. I hope the Zend guys fix [...]