FitText.js icon indicating copy to clipboard operation
FitText.js copied to clipboard

Refactored

Open kalisjoshua opened this issue 13 years ago • 2 comments
trafficstars

I just saw you on CSS Summit today. I love the small library philosophy for JavaScript. Anyway I wanted to send you my two cents on fittext just in case you were looking for any collaboration. If not, I at least got to understand your code a little more. Keep on rockin out with the small JS libs.

kalisjoshua avatar Aug 01 '12 20:08 kalisjoshua

Does this mean defaults attaches global namespace? It should probably be under $.fn.fitText in order to be polite. Right?

davatron5000 avatar Aug 03 '12 16:08 davatron5000

No, defaults isn't in the global scope. It is in the function/closure scope where the plugin is the only code that can access it. This way that value isn't re-evaluated each time the plugin is executed only once per page load.

kalisjoshua avatar Aug 03 '12 17:08 kalisjoshua