
Originally Posted by
Zero Grav
This quote is hidden because you are
ignoring this member.
Show
Edit: Foutje, fout gezien, secondje..
Uw site is trouwens nog steeds echt super traag.
I know. Nu waarschijnlijk zeker, aangezien ik JS samenvoegen heb afgezet.

Originally Posted by
Zero Grav
This quote is hidden because you are
ignoring this member.
Show
Doe eens gewoon een backspace na uw allerlaatste ;, dat lost het hier op.
Hier niet hoor. Kan je je code eens copypasten wat jij hebt dan?
EDIT: lokaal werkt het ook niet, maar op jsfiddle wel ... http://jsfiddle.net/Yb9yj/
EDIT2: laatste puntkomma was blijkbaar corrupt.
Deze code werkt:
Code:
(function ($) {
$.fn.textfill = function (options) {
this.each(function () {
var fontSize = options.maxFontPixels;
var ourText = $('h2 a', this);
var maxHeight = $(this).height();
var maxWidth = $(this).width();
var textHeight;
var textWidth;
do {
ourText.css('font-size', fontSize);
textHeight = ourText.height();
textWidth = ourText.width();
fontSize = fontSize - 1;
} while ((textHeight > maxHeight || textWidth > maxWidth) && fontSize > 16);
});
return this;
};
})(jQuery);
$(document).ready(function () {
$('.fotonode.fotopagina').textfill({
maxFontPixels: 30
});
});
EDIT3: ah, nu begrijp ik wat je bedoelde ZeroGrav
Je had dus gelijk.