📅  最后修改于: 2023-12-03 15:32:20.219000             🧑  作者: Mango
The sortBy
property of jQWidgets jqxTagCloud is used to define the type of sorting to be applied to the tags in the tag cloud. It accepts a string value that can be set to one of the following options:
none
: No sorting is applied to the tags.alphabetical
: The tags are sorted alphabetically.weight
: The tags are sorted based on their weight, with the heaviest tags first.length
: The tags are sorted based on their length, with the longest tags first.To use the sortBy
property, you need to set it as an option when you initialize the jqxTagCloud. Here's an example:
$("#myTagCloud").jqxTagCloud({
source: myTags,
sortBy: "weight" // Or any other valid option
});
$("#myTagCloud").jqxTagCloud({
source: myTags,
sortBy: "alphabetical"
});
This will sort the tags in the tag cloud alphabetically.
$("#myTagCloud").jqxTagCloud({
source: myTags,
sortBy: "weight"
});
This will sort the tags in the tag cloud based on their weight, with the heaviest tags first.
$("#myTagCloud").jqxTagCloud({
source: myTags,
sortBy: "length"
});
This will sort the tags in the tag cloud based on their length, with the longest tags first.
The sortBy
property of jQWidgets jqxTagCloud is a useful feature that allows you to sort the tags in the tag cloud based on different criteria. It provides flexibility and customization options to the tag cloud, making it a versatile and powerful tool.