From 1ca92d21af0ded02ca44905c981348d7d885bfe7 Mon Sep 17 00:00:00 2001 From: Alastair Gifillan Date: Tue, 13 Aug 2013 01:41:53 +1000 Subject: [PATCH] data/rel Attribute Fix for Validation #6 W3C (x)HTML Validator issues Fix by @chriweis --- jquery.tagcloud.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.tagcloud.js b/jquery.tagcloud.js index 4e5d5a3..6fe1335 100644 --- a/jquery.tagcloud.js +++ b/jquery.tagcloud.js @@ -58,7 +58,7 @@ var opts = $.extend({}, $.fn.tagcloud.defaults, options); var tagWeights = this.map(function(){ - return $(this).attr("rel"); + return $(this).data("weight"); }); tagWeights = jQuery.makeArray(tagWeights).sort(compareWeights); var lowest = tagWeights[0]; @@ -75,7 +75,7 @@ colorIncr = colorIncrement (opts.color, range); } return this.each(function() { - var weighting = $(this).attr("rel") - lowest; + var weighting = $(this).data("weight") - lowest; if (opts.size) { $(this).css({"font-size": opts.size.start + (weighting * fontIncr) + opts.size.unit}); }