Question

I am trying to create a tag cloud using the jquery plugins here

and using the following code:

<script type="text/javascript" language="javascript">

$(document).ready(function()
{
  generateTagCloud();

});

function generateTagCloud()
{

     $("#xlist").tagcloud();
}

 </script>
<div><!--JQueryTagCloud-->
<ul id="xlist" class="xmpl">
<li><a href="http://del.icio.us/tag/design">design</a> </li>
 <li><a href="http://del.icio.us/tag/blog">blog</a> </li>
<li><a href="http://del.icio.us/tag/programming">programming</a> </li>
<li><a href="http://del.icio.us/tag/tools">tools</a> </li>
 <li><a href="http://del.icio.us/tag/music">music</a> </li>
<li><a href="http://del.icio.us/tag/software">software</a> </li>
<li><a href="http://del.icio.us/tag/webdesign">webdesign</a> </li>
<li><a href="http://del.icio.us/tag/web2.0">web2.0</a> </li>
 <li><a href="http://del.icio.us/tag/video">video</a> </li>
<li><a href="http://del.icio.us/tag/art">art</a> </li>
<li><a href="http://del.icio.us/tag/reference">reference</a> </li>
</ul>

But i get the following error: Object doesn't support this property or method.All the scripts are being loaded. I am not able to figure out why am i getting this error.

Please help me!!

No correct solution

OTHER TIPS

I have tested the same in my local instance, You need to include follwing files into your code for your example.,

Source: https://github.com/mikeal/testbot/tree/master/testbot/static/tagcloud/scripts

<script type="text/javascript" src="jquery.tagcloud.min.js"></script>
<script type="text/javascript" src="jquery.tinysort.min.js"></script>

Just a guess: maybe this is incorrect char case in tagcloud();

$("#xlist").tagcloud();
$("#xlist").tagCloud(); //correct case

or use

$(function(){
   generateTagCloud();
});

instead of $(document).ready I guess there can be no ready function

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top