当前位置: 首页 > 工具软件 > jQCloud > 使用案例 >

JqCloud云标签

糜昌胤
2023-12-01
JqCloud云标签使用时需要下载相应的js包,如jquery,jqcloud包等等。

function showJqCloud(tags){
var word_array = /* new Array();*/
[
{text: "ifxoxo.com", weight: 13, link: "http://ifxoxo.com/jquery-jqcloud.html"},
{text: "520xmn.com", weight: 10.5},
{text: "jquery", weight: 9.4},
{text: "jqcloud", weight: 8},
{text: "ifxoxo1", weight: 6.2},
{text: "ifxoxo2", weight: 5},
{text: "ifxoxo3", weight: 5},
{text: "Nam et", weight: 5},
{text: "Sapien", weight: 4},
{text: "Pellentesque", weight: 3},
{text: "et malesuada", weight: 3},
{text: "fames", weight: 2},
{text: "sit amet", weight: 2},
{text: "justo", weight: 1},
{text: "dictum", weight: 1},
{text: "Ut et leo", weight: 1},
];
for(var i=0;i<tags.length;i++){
var t=tags[i];
word_array.push({id:t.id,text: t.name, weight: t.refNum,tag:t,handlers:{click:clickTagCloud},link:""});
}
$("#sceneTagDiv").html("");
$("#sceneTagDiv").jQCloud(word_array,{delayedMode:true,width: 300,
height: 800, removeOverflowing: true});

//removeOverflowing:超出部分不显示

}
 类似资料: