Saturday Night’s Alright (For Geeks)

December 15, 2007 by Jim · 2 Comments 

Tonight I spent a bit of time working on my wife's new site for Your Door & More. I wanted to implement some sort of image rotation. I was going to crank out a cheezy animated GIF but started digging around the jQuery site and found the Cycle plugin.

jQuery Cycle Plugin
This couldn't have been easier to implement. Wrap some images in a container:

CODE:
  1. <div id="s1" class="pics">
  2.    <img src="img1.gif" height="320" width="450" />
  3.    <img src="img2.gif" height="320" width="450" />
  4.    <img src="img3.gif" height="320" width="450" />
  5.    <img src="img4.gif" height="320" width="450" />
  6. </div>

Include the jQuery Cycle plugin and this simple bit of jQuery:

CODE:
  1. $(document).ready(function(){
  2.   $('#s1').cycle('fade');
  3. });

The default 'fade' effect was adequate for my needs but the Cycle plugin has many more transitions and parameters you can use - check out the documents for more details.

GIMP (GNU Image Manipulation Program)
I've tinkered with the GIMP on Linux at home but to be honest whenever I had to do any heavy graphic work I used Photoshop on my wife's PC. Tonight I decided to sit down and force myself to try and crank out these graphics using the GIMP. I had original PDF's of each image. I opened these and then used the GIMP's built in screenshot utility to get them imported. Next it was just a matter of cropping and resizing things and then saving them as GIFs. I spent most of my time trying different GIMP preferences and finally figured out how to get most of the commonly used menu's under control by docking them on the main window. I think I'm going to pickup a GIMP book and start using it more!!

Possibly Related:

  • No related posts found.

Comments

2 Responses to “Saturday Night’s Alright (For Geeks)”
  1. Ben Nadel says:

    jQuery makes stuff sooo easy :) Once you get nice and comfortable with jQuery, it’s going to become part of your code refactoring; you’ll start looking up and thinking, Ok, how can I use jQuery to make my code cleaner.

  2. Jim says:

    I’m all over jQuery – I’ve got most of our application team ‘converted’ and this week I’m giving a preso to our webdev team as well! :)

Tell us what you're thinking...