Skip to content

Commit

Permalink
LO: fix readme (hopefully...)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaong committed Feb 1, 2011
1 parent 5a57df7 commit b12159c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ Once you imported the .js an .css files, drawing a cloud is as simple as this:
<pre><code>
<div id="wordcloud" style="width: 750px; height: 500px; position: relative;"></div>
<script type="text/javascript">

//
// Create an array of word objects to be passed to jQCloud, specifying for each word in the cloud the following attributes:
//
// text: [mandatory] string containing the word(s)
// weight: [mandatory] number (integer or float) defining the relative importance of the word (such as the number of occurrencies, etc.). The range of values is arbitrary.
// weight: [mandatory] number (integer or float) defining the relative importance of the word
// (such as the number of occurrencies, etc.). The range of values is arbitrary.
// url: [optional] a URL to which the word must be linked. It will be used as the href attribute of an HTML anchor.
//
var word_list = new Array(
{text: "Lorem", weight: 15},
{text: "Ipsum", weight: 9, url: "http://jquery.com/"},
Expand All @@ -31,7 +34,6 @@ Once you imported the .js an .css files, drawing a cloud is as simple as this:
);
// Call jQCloud on a jQuery wrapper passing the word list as argument. Chainability of methods is maintained.
$("#wordcloud").jQCloud(word_list);

</script>
</code></pre>

Expand Down

0 comments on commit b12159c

Please sign in to comment.