cnblogs TagCloud基于jquery的实现代码
2010-06-11 00:00
483 查看
1. 进入"管理 >> 配置"面板
2. 在"通过CSS定制页面风格"文本框内, 添加:
3. 在"页脚Html代码"文本框内, 添加:
2. 在"通过CSS定制页面风格"文本框内, 添加:
/***********tag cloud css****************/ #tagCloud { text-align:center; overflow:hidden; } #tagCloud a{ padding: 0 5px; line-height:1.5em; display:inline-block; }
3. 在"页脚Html代码"文本框内, 添加:
<script> /***********tag cloud script****************/ if($("#taglist").length>0) { var dict = {}; $("#taglist td").has("a").has("span").each(function(i, x){ dict[$("a", this).text()] = $("span", this).text().replace(/[)(]/g, ""); }); $("<div>").attr("id", "tagCloud").appendTo("div#mainContent"); for(var k in dict) { var sz = (dict[k] * 4) + 12; $("<a>") .attr("href", "http://www.cnblogs.com/k-sharp/tag/"+escape(k)+"/") .attr("title", dict[k]) .css("font-size", sz + "px") .text(k) .appendTo("#tagCloud"); } $("#taglist").remove(); } </script>
相关文章推荐
- cnblogs TagCloud基于jquery的实现代码
- 基于jquery的loading效果实现代码
- 基于jquery的loading效果实现代码
- 基于jQuery实现返回顶部实例代码
- 基于jQuery实现点击弹出层实例代码
- 基于Jquery实现表格动态分页实现代码
- 基于jquery的选择标签至文本域效果,可多选/可过滤重复/可限制个数的实现代码
- 基于jquery的禁用右键、文本选择功能、复制按键的实现代码
- 基于jQuery实现的美观星级评论打分组件代码
- 基于jQuery实现仿51job城市选择功能实例代码
- 基于jQuery的简单九宫格实现代码
- 基于jquery的实现异步跨域提交表单的实现代码,需要的朋友可以参考下。
- 基于jquery实现的银行卡号每隔4位自动插入空格的实现代码
- 基于jQuery的输入框无值自动显示指定数据的实现代码
- 基于jquery的高性能td和input切换并可修改内容实现代码
- 基于Jquery的$.cookie()实现跨越页面tabs导航实现代码
- 基于Jquery代码实现支持PC端手机端幻灯片代码