davatron5000 / FitText.js

A jQuery plugin for inflating web type
http://fittextjs.com
6.75k stars 1.39k forks source link

i don't understand the code in fittext.js, anyone can explain ? #77

Closed dfang closed 11 years ago

dfang commented 11 years ago

for this line:

$(window).on('resize.fittext orientationchange.fittext', resizer);

why the event name is " resize.fittext orientationchange.fittext " , not "resize orientationchange" ?

thanks !

davatron5000 commented 11 years ago

It's a custom event. Sorta like jquery's way of namespacing an event do you can unbind just that function:

// How to destroy FitText $(window).off('resize.fittext');

dfang commented 11 years ago

@davatron5000 cool, thank you !