Skip to content

godspeed1715/jquery.tagcloud.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jquery.tagcloud.js

Usage with JSON data:

Create a new div element with a unique ID.

<div id="tagcloudwithJSON">
</div>

Create the JSON data.

var oJsonData = [{"weight":"0.1","value":"Lorem"},
    {"weight":"2","value":"ipsum"},
    {"weight":"3","value":"dolor"},
    {"weight":"4","value":"sit"},
    {"weight":"5","value":"amet,"},
    {"weight":"6","value":"consectetur"},
    {"weight":"7","value":"adipisicing"}
];

Initialize the tagcloud plugin.

$(function () {
  $('#tagcloudwithJSON').tagcloud({
    "sWeightSelector": "data-weight",
    "bJson": true,
    "oData": oJsonData
  });
});

Usage without JSON data:

Create a new div element with a unique ID.

<div id="tagcloudwithoutJSON">
    <a href="#" rel="0.1">Lorem</a>
    <a href="#" rel="2">ipsum</a>
    <a href="#" rel="3">dolor</a>
    <a href="#" rel="4">sit</a>
    <a href="#" rel="5">amet,</a>
</div>

Initialize the tagcloud plugin.

$(function () {
    $('#tagcloudwithoutJSON').tagcloud();
});

Demo

Check it out here.

About

A Simple Tag Cloud Plugin for JQuery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%