Listening to window.resize events can be cumbersome, because it is trigerred many times when resizing the window, which results in a huge work load for the website. Some older browsers even trigger this event multiple times for each resizing...
To make working with this event easier, the template does all the work of listening and smoothing the event, and send 2 custom events:
These events are also trigerred when the user tilts a mobile device (event 'orientationchange').
To use them, listen on the window element:
$(window).on('normalized-resize', function(event) { ... });
Aside from window resizing, the template also provides a way to watch an element and send custom events when its size changes. Several element size events are available:
To use them, you may either use jQuery bind methods:
$(selector).on('sizechange', function(event) { ... });
Or use the helper methods (there is one for each event type):
$(selector).sizechange(function(event) { ... });