By jthomas on July 14, 2009 at 11:18 am.
Filed under: jQuery
Recently while working on a client project I was met with a situation in which I needed to do some client-side feedback to validation of a couple fields. I wanted something a little more spiced up than your typical turn-the-field-red or put-a-red-asterisk next to it.
The jQuery UI Effects library had just what I was looking for, with only one problem. In order to use the desired effect I had to include over 100 kb of additional Javascript. My app was already pretty heavy on the client side so I sought a way to achieve the effect with as little cruft as possible.
So, after a little hacking around, I present the “Mini” UI Effects plugins. They are a set of plugins that are lightweight and attempt to offer a similar experience to the jQuery UI effects. For now there are just three basic effects, “Blink”, “Wiggle” and “Bob.” They are similar to the jQuery UI “Pulsate”, “Shake” and “Bounce” effects respectively.
Please feel free to download and use them in your own projects both commercial and personal alike. They have been tested to work in IE6+, Safari and Firefox.
Check out a demo and download the jQuery Mini UI plugins here. Let me encourage you to leave feedback in the comments. We’d love to hear of any experience using them (bugs or otherwise). Enjoy.
By jthomas on at 10:10 am.
Filed under: Languages, PHP, Quick Tips and Tricks
Many PHP frameworks make use of routing through one master file, typically index.php. It is easy enough, however, to write that portion of the URL out, thus achieving a more svelte and sexy address bar in the process.
To do so just create an .htaccess file in your app’s root directory (likely next to the index.php in question) if one doesn’t already exist (OS X folks may have to use Terminal to work with .htaccess as it will be invisible). Then drop these rules into place:
<ifmodule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</ifmodule>
<ifmodule !mod_rewrite.c>
ErrorDocument 404 /index.php
</ifmodule>
Some frameworks require that you configure the base URL of the system, so don’t forget to do that too or your app will start acting wacky after this is in place.
By jthomas on July 1, 2009 at 11:27 am.
Filed under: Quick Tips and Tricks
Something we’ve noticed and annoyed by for years now is iChat (and likely other instant message clients) tends to throw up when you try to send code through them when connected through the AIM network. Specifically, HTML or text with < and >. There doesn’t seem to be a lot of rhyme or reason as to when it happens, either.
One little trick we use when in the office is to open the Bonjour List (⌘ + 2) and send the message via Bonjour instead of AIM. Voilá, code through IM.
By jberman on June 25, 2009 at 12:09 pm.
Filed under: Actionscript
I’m building a Flash application for a client which displays a question, waits for the user to absorb it, then disappears, finally showing the various answer choices.
Its been difficult coming to a happy medium when deciding how long it should display the question and make sure the user has enough time to read and absorb its information.
I’ve come to the conclusion that it takes a person one tenth a second for each character to properly read and absorb the sentence before it disappears.
Therefore, you should have taken no longer than 57.5 seconds to read this blog post!