Building a jQuery-Powered Tag-Cloud

Tag-clouds are easy to do badly; whether from a design perspective or from a code perspective. Thanks to jQuery, it’s also easy to do well. We’ll be using the hot new 1.3 version of jQuery for this example and will be working with PHP and MySql to provide a JSON feed of our tags. Getting the tags into a database in the first place is beyond the scope of this tutorial, but it’s a simple enough matter to retrieve and pass them to a waiting page via AJAX.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="tagcloud.css"> <meta http-equiv="Content-Type" cevent_event_on__tent="text/html; charset=utf-8"> <title>jQuery Tag Cloud</title> </head> <body> <div id="tagCloud"> <h2>Tag Cloud</h2> </div> <script type="text/javascript" src="jquery-1.3.min.js"></script> <script type="text/javascript"> ...

From NETTUTS

Tags: Javascript, Tag Cloud, jQuery, Javascript & AJAX

No comments



SetPageWidth