jDoeCloud

jDoeCloud a center weighted jQuery tag cloud plugin.


So why make another tag cloud?
I was looking for a good looking tag/word cloud plugin and noticed that all the plugins basically looks the same with just a list of the words line by line. What I wanted was a center weighted word/tag cloud that's a little bit more fancy looking.

This is the result:

The code to generate the cloud is pretty simple. Consider this list:
<ul class="mycloud">
    <li title="10">large tag</li>
    <li title="7">avarage</li>
    <li title="3">small</li>
</ul>

As you can see, in this example I use the "title"-attribute as the "score" (default). The list should always be sorted by the largest score first.

We generate the wordcloud by running the following code.
$(function(){
    $('.mycloud').doecloud();
});

There is also a bunch of settings:

  • itemSelector: What items should be selected. Default " > li".
  • valueAttribute: Attribute that represent the "score". Default "title".
  • width: Width of cloud in pixels. Default "0" meaning "automatic".
  • height: Height of cloud in pixels. Default "0" meaning "automatic".
  • maxFontSize: Font size of largest tag.
  • minFontSize: Font size of smallest tag.
  • maxCount: Maximum number of tags shown. Default 100. Warning; increasing this value can cause the cloud to become very slow to generate.
  • promote: Default value "true". (not used yet)
  • spacing: spacing in pixels between items. 
Download
jDoeCloud.v1.0.zip 2012-01-24


0 comments:

Post a Comment