summaryrefslogtreecommitdiff
path: root/modules/tag/js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-11-25 22:38:11 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-11-25 22:38:11 +0000
commit1ea0382f5346c2fb1a2388a8a53adfe40078dc10 (patch)
treeda5788af9a86a8b559eca22bcec2ae63a858a9ea /modules/tag/js
parente9e589e5ebb54d016f1e52d4ba776970456e39b6 (diff)
Moving right along on tags. Now the threshold for which tags can be changed. The default is to show all the tags (i.e. count >= the minimum frequency) by clicking on the "See Less" link, the tag cloud will not show the minimum frequency, so the number of tags shown is smaller.
The "See More" link works the opposite way.
Diffstat (limited to 'modules/tag/js')
-rw-r--r--modules/tag/js/tag.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js
new file mode 100644
index 00000000..6157b81b
--- /dev/null
+++ b/modules/tag/js/tag.js
@@ -0,0 +1,24 @@
+$("document").ready(function() {
+ $("#gTagLess").click(function(event){
+ event.preventDefault();
+ get_tag_block($("#gTagLess").attr("href"));
+ });
+ $("#gTagMore").click(function(event){
+ event.preventDefault();
+ get_tag_block($("#gTagMore").attr("href"));
+ });
+});
+
+function get_tag_block(url) {
+ $.get(url, function(data) {
+ $('#gTag').html(data);
+ $("#gTagLess").click(function(event){
+ event.preventDefault();
+ get_tag_block($("#gTagLess").attr("href"));
+ });
+ $("#gTagMore").click(function(event){
+ event.preventDefault();
+ get_tag_block($("#gTagMore").attr("href"));
+ });
+ });
+}