You can extending Universal Theme by attaching handlers to its events.
theme42ready is triggered after the initialization of Universal Theme:
theme42ready
apex.jQuery(window).on('theme42ready', function() { console.log('Do something after UI elements are rendered on the page.'); });
theme42layoutchanged is triggered when left navigation menu is expanded or collapsed.
theme42layoutchanged
apex.jQuery("#t_TreeNav").on('theme42layoutchanged', function(event, obj) { console.log('Left menu action: ' + obj.action); // obj.action will return expand or collapse });
apexwindowresized is triggered by the browser window resize or the maximize/restore action of a region.
apexwindowresized
apex.jQuery(window).on('apexwindowresized', function() { console.log('Window resized.'); });