diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-25 15:48:28 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-06-25 15:48:28 +0300 |
commit | d0633017b40cf066a83d1a6b1f675a442b35a7f8 (patch) | |
tree | 5aa7e3874cd55b3ff04082d4d5b5431b5c43d8ce /fluxx_compensator | |
parent | a4acf3fb3438920db2bdfea1471ce74990459736 (diff) | |
parent | ad5b584bec8ab11c64ebdcd065e10c689b7108af (diff) |
Merge pull request #1652 from C5H8NNaO4/master
Moved the call to `$.ready` to the bottom.
Diffstat (limited to 'fluxx_compensator')
-rw-r--r-- | fluxx_compensator/js/fluxx.js | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/fluxx_compensator/js/fluxx.js b/fluxx_compensator/js/fluxx.js index 30a566e8b..8ae7464f8 100644 --- a/fluxx_compensator/js/fluxx.js +++ b/fluxx_compensator/js/fluxx.js @@ -28,35 +28,6 @@ * @author Christian Reiner */ -$(document).ready(function(){ - // set a few default style rules to make transitions work in firefox - OC.FluXX.defaults(); - // setup a prefetch relation to prepare toggling the transition styles without having to load them later - OC.FluXX.transitions=$('<link/>',{ -// 'id':'fluxx-transitions', - 'rel':'prefetch', - 'type':'text/css', - 'href':OC.filePath('fluxx_compensator','css','transitions.css') - }); - OC.FluXX.transitions.appendTo('head'); - // setup handle objects - if ($('body#body-user, body#body-settings').length){ - if ($('body header > #header').length) - OC.FluXX.Handle['H']=OC.FluXX.create('H', OC.FluXX.C_VERTICAL, 'body header > #header', 0, 0); - if ($('body nav > #navigation').length) - OC.FluXX.Handle['N']=OC.FluXX.create('N', OC.FluXX.C_HORIZONTAL, 'body nav > #navigation', 0, 0); - } - // initialize handles - OC.FluXX.init(); - // initialize logic - OC.FluXX.mode(); - // reposition the handles upon resize of the window - $(window).on('resize',function(){ - $.each(OC.FluXX.Handle, function(){ - OC.FluXX.maximize(this); - }); - }); -}) /** * @class OC.FluXX @@ -510,3 +481,34 @@ OC.FluXX={ $('head #fluxx-transitions').one('load',function(){clearTimeout(timer);OC.FluXX.time(handle);}); } // OC.FluXX.toggle } // OC.FluXX + + +$(document).ready(function(){ + // set a few default style rules to make transitions work in firefox + OC.FluXX.defaults(); + // setup a prefetch relation to prepare toggling the transition styles without having to load them later + OC.FluXX.transitions=$('<link/>',{ +// 'id':'fluxx-transitions', + 'rel':'prefetch', + 'type':'text/css', + 'href':OC.filePath('fluxx_compensator','css','transitions.css') + }); + OC.FluXX.transitions.appendTo('head'); + // setup handle objects + if ($('body#body-user, body#body-settings').length){ + if ($('body header > #header').length) + OC.FluXX.Handle['H']=OC.FluXX.create('H', OC.FluXX.C_VERTICAL, 'body header > #header', 0, 0); + if ($('body nav > #navigation').length) + OC.FluXX.Handle['N']=OC.FluXX.create('N', OC.FluXX.C_HORIZONTAL, 'body nav > #navigation', 0, 0); + } + // initialize handles + OC.FluXX.init(); + // initialize logic + OC.FluXX.mode(); + // reposition the handles upon resize of the window + $(window).on('resize',function(){ + $.each(OC.FluXX.Handle, function(){ + OC.FluXX.maximize(this); + }); + }); +}) |