Skip to content

Commit

Permalink
Remove unnecessary variable from func resizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Boldewyn committed May 10, 2011
1 parent 7ce7b61 commit 3fdd7f4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions jquery.fittext.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@
var compressor = kompressor || 1; // set the compressor

// Resizer() resizes items based on the object width divided by the compressor * 10
var resizer = function ( obj ) {
obj.css('font-size', Math.min(obj.width() / (compressor*10), origFontSize));
}
var resizer = function () {
$this.css('font-size', Math.min(obj.width() / (compressor*10), origFontSize));
};

// Call once to set.
resizer($this);
resizer();

// Call on resize. Opera debounces their resize by default.
$(window).resize(function() {
resizer($this);
});
$(window).resize(resizer);

});

Expand Down

0 comments on commit 3fdd7f4

Please sign in to comment.