Archives

Fading Effect with YUI’s Animation Utility

Posted on May 2, 2008
Filed Under Javascript | 9 Comments

In YUI's Animation Utility example page there are demonstrations on how to create color and motion animations. However I couldn't find an example for how to create fading effect. After spending some time on trying different approaches, I came up with this code snip:
Read more »

Creating a Digg This Button for Your WordPress Blog

Posted on April 30, 2008
Filed Under Javascript, WordPress | 6 Comments

Creating a Digg This button is very easy. Here's a non-plugin approach:



Copy and paste above script to anywhere between your WordPress' theloop:


Instead post specific Digg button, you can create a site wide button as well:




Read more »

JavaScript Source Joiner/Combiner

Posted on March 18, 2008
Filed Under Java, Javascript | 2 Comments

The complexity of JavaScript code has increased rapidly over the last two years. The emerging of various JavaScript libraries/frameworks along with Ajax technology enable us to build sophisticate applications which are comparable to desktop ones. A mid-size to large-size Ajax/JavaScript applications normally consist of thousands lines of code. For readability and navigability, it is practical and logical to separate the code into different files. For example, allocate one file for each class. Many developers don't want to or at least hesitated at doing so because more JavaScript files means additional HTTP requests to the server, which impacts page loading efficiency.

Read more »

A Useful JavaScript Image Loader

Posted on February 21, 2008
Filed Under Javascript | 34 Comments

I released a YUI implementation of image gallery script a month ago. While it was quite an enjoyable experience to explore the potential of YUI and JavaScript, I found I have created many userful code snips (for instance this Loading Panel) along the way.

Today I am going to show you another useful JavaScript code snip: Image Loader. What! You might ask. I admit that name is too generic, but it does what it does - it helps you to load images using JavaScript. Just give it an image URL, it will return a DOM image object that can be used for dynamic loading of images. This script provides a loading completion event, which is very useful for displaying preloader or extra information when the image is being loaded.

The original image loader I created relies on YUI, but I want to make it as portable as possible, so I created a standalone version.

Read more »

How to Create a WordPress Theme Viewer

Posted on February 21, 2008
Filed Under WordPress | 8 Comments

For WordPress veteran this might not be new, which is, let visitor preview multiple themes in one WordPress installation. It puzzled me quite a while before I figured out how to do it. The very reason for the need of this feature is that I want to allow regular users to view different themes on a WordPress powered website. I wasn't able to until I ran into this page. Yea right! A theme switcher. I installed this plugin and tested. It provides the exact function that I need. Fantastic.

Now here comes the interesting stuff. The official documentation documented the plugin is as follow, which outputs a list of links that can switch to a specific theme:

Read more »

Page 2 of 712345...Last »
Code Central Special

Categories

Polls

  • Which one do you prefer?

    View Results

    Loading ... Loading ...