From 1ea0382f5346c2fb1a2388a8a53adfe40078dc10 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 25 Nov 2008 22:38:11 +0000 Subject: 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. --- modules/tag/js/tag.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 modules/tag/js/tag.js (limited to 'modules/tag/js') 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")); + }); + }); +} -- cgit v1.2.3