Skip to content
Permalink
Browse files

Put the js function in another .js file

  • Loading branch information
humitos committed Aug 21, 2015
1 parent 4a5b116 commit 7f1c48f838a693a28e90fb1a2fd9181112c2b53b
Showing with 1 addition and 23 deletions.
  1. +1 −23 v7/tx3_tag_cloud/templates/mako/tags.tmpl
@@ -40,27 +40,5 @@

<%block name="extra_js">
<script type="text/javascript" src="/assets/js/jquery.tx3-tag-cloud.js"></script>
<script type="text/javascript">
function create_li_tags() {
$.getJSON("/assets/js/tx3_tag_cloud.json", function(data){
var items = [];
$.each(data, function(key, val){
var count = val[0]
var url = val[1]
var posts = val[2]
items.push("<li data-weight='" + count + "'><a href='" + url + "'>" + key + "</a></li>");
});

$("<ul/>", {
"id": "tagcloud",
html: items.join("")
}).appendTo("div.row");

$("#tagcloud").tx3TagCloud({
multiplier: 5 // default multiplier is "1"
});
});
}
create_li_tags();
</script>
<script type="text/javascript" src="/assets/js/tx3-tag-cloud.js"></script>
</%block>

0 comments on commit 7f1c48f

Please sign in to comment.
You can’t perform that action at this time.