addywaddy / jquery.tagcloud.js

A Simple Tag Cloud Plugin for JQuery
http://addywaddy.github.com/jquery.tagcloud.js/
MIT License
227 stars 74 forks source link

Minor update: Added support for data-weight="". #12

Open godspeed1715 opened 10 years ago

godspeed1715 commented 10 years ago

I added the option 'weightselector' which allows the selector of either 'data-weight="'' or 'rel=""'. The if statement that replaces '$(this).attr("rel")': '((opts.weightselector == "rel") && $( this ).attr('rel') || (opts.weightselector == "data") && $( this ).data('weight'))'