This repository was archived by the owner on Jul 24, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 18
18
resizeTimeout ;
19
19
// When the page is resized, adjust the flexMenus.
20
20
function adjustFlexMenu ( ) {
21
- $ ( flexObjects ) . each ( function ( ) {
22
- $ ( this ) . flexMenu ( {
23
- 'undo' : true
24
- } ) . flexMenu ( this . options ) ;
25
- } ) ;
21
+ if ( $ ( window ) . width ( ) !== windowWidth || $ ( window ) . height ( ) !== windowHeight ) {
22
+ $ ( flexObjects ) . each ( function ( ) {
23
+ $ ( this ) . flexMenu ( {
24
+ 'undo' : true
25
+ } ) . flexMenu ( this . options ) ;
26
+ } ) ;
27
+ windowWidth = $ ( window ) . width ( ) ; // Store the window width if it changed
28
+ windowHeight = $ ( window ) . height ( ) ; // Store the window height if it changed
29
+ }
26
30
}
27
31
function collapseAllExcept ( $menuToAvoid ) {
28
32
var $activeMenus ,
32
36
$menusToCollapse . removeClass ( 'active' ) . find ( '> ul' ) . hide ( ) ;
33
37
}
34
38
$ ( window ) . resize ( function ( ) {
35
- if ( $ ( window ) . width ( ) != windowWidth && $ ( window ) . height ( ) != windowHeight ) {
36
- clearTimeout ( resizeTimeout ) ;
37
- resizeTimeout = setTimeout ( function ( ) {
38
- adjustFlexMenu ( ) ;
39
- } , 200 ) ;
40
- windowWidth = $ ( window ) . width ( ) ; // Store the window width if it changed
41
- windowHeight = $ ( window ) . height ( ) ; // Store the window height if it changed
42
- }
39
+ clearTimeout ( resizeTimeout ) ;
40
+ resizeTimeout = setTimeout ( function ( ) {
41
+ adjustFlexMenu ( ) ;
42
+ } , 200 ) ;
43
43
} ) ;
44
44
$ . fn . flexMenu = function ( options ) {
45
45
var checkFlexObject ,
You can’t perform that action at this time.
0 commit comments