So I got the cloud sorting alphabetically by changing the sort function from [code] if ($.dynaCloud.sort) { cl.sort(function(a, b) { if (a.count == b.count) { return a.el < b.el ? -1 : (a.el == b.el ? 0 : 1); } else { return a.count < b.count ? 1 : -1; } }); } [/code] to [code] if ($.dynaCloud.sort) { cl.sort(function(a, b) { return a.el < b.el ? -1 : (a.el == b.el ? 0 : 1); }); } [/code]
still trying to figure out how to add an & into what I think is the permitted character list. var word = /^[a-z]*[A-Z]([A-Z]+|[a-z]{3,})/; On Sep 21, 6:45 pm, pedalpete <[EMAIL PROTECTED]> wrote: > I've been playing with theDynaCloudplugin over the weekend and as > per normal, I don't have a standard implementation. > > I'm using the tag-cloud as a way to define musical genres on my site. > The list is created dynamically, which is whydynacloudis an awesome > implementation. > > But I'm having a few problems. > > 1) First of all, the 'sort' options sorts by most popular occurance, > but I'm trying to figure out how to sort alphabetically. > 2) some of my genres have multi-word or special characters, and > thedynacloudbreaks these into seperate words in the tag cloud. > For instance, R&B becomes 'r' and then somewhere else in the tag cloud > becomes 'b' or nu-jazz becomes 'nu' and 'jazz' gets added to the other > jazz entries. > I've resolved this in multi-word genres by using [code] [/code] > which strangely does not get filtered out, but [code]&[/code] does > seem to get filtered. > > As far as I can tell, the regular expressions for stripping values is > below (though i could be wrong). > I've tried adding in &, but haven't been able to get it to work. > [code] > var elems = $(this).text().replace(/\W/g, " > ").replace($.dynaCloud.stopwords, " ").split(" "); > var word = /^[a-z]*[A-Z]([A-Z]+|[a-z]{3,})/; > [/code] > > I've posted a demo athttp://zifimusic.com/tagCloud > Though the demo only shows the tag cloud, it isn't hooked up to any > further functionality yet.