Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Put the js function in another .js file
  • Loading branch information
humitos committed Aug 21, 2015
1 parent 4a5b116 commit 7f1c48f
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions v7/tx3_tag_cloud/templates/mako/tags.tmpl
Expand Up @@ -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.