-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Updated translation file and version bump""
This reverts commit 00d982d.
- Loading branch information
Showing
7 changed files
with
349 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,66 @@ | ||
( function() { | ||
|
||
var self = this; | ||
|
||
this.events = function() { | ||
|
||
// Add parent class to items with sub-menus | ||
jQuery( 'ul.sub-menu' ).parent().addClass( 'parent' ); | ||
|
||
var mobilemenu_instance = jQuery( '.nav-horizontal' ).data( 'dlmenu' ); | ||
|
||
if ( window.matchMedia( 'screen and (max-width: 1024px)' ).matches ) { | ||
|
||
if ( ! mobilemenu_instance ) { | ||
jQuery( '.nav-horizontal' ).dlmenu(); | ||
} | ||
|
||
} else { | ||
|
||
// action for screen widths below 768 pixels | ||
if ( mobilemenu_instance ) { | ||
jQuery( '.nav-horizontal' ).dlmenu( 'destroy' ); // kill it | ||
} | ||
|
||
// Enable hover dropdowns for window size above tablet width | ||
jQuery( '.nav-horizontal' ).find( '.menu li.parent' ).hoverIntent({ | ||
sensitivity: 3, // number = sensitivity threshold (must be 1 or higher) | ||
interval: 100, // number = milliseconds for onMouseOver polling interval | ||
timeout: 200, // number = milliseconds delay before onMouseOut | ||
over: function() { | ||
jQuery( this ).find( 'ul.sub-menu' ).first().addClass( 'open' ); | ||
}, | ||
out: function() { | ||
jQuery( this ).find( 'ul.sub-menu' ).first().removeClass( 'open' ); | ||
} | ||
}); | ||
|
||
} | ||
}; | ||
|
||
this.init = function() { | ||
|
||
if ( typeof jQuery.fn.dlmenu === 'undefined' ) { | ||
return; | ||
} | ||
|
||
self.events(); | ||
|
||
window.addEventListener( 'orientationchange', function() { | ||
self.events(); | ||
}, true ); | ||
|
||
jQuery( window ).smartresize( function() { | ||
self.events(); | ||
}); | ||
}; | ||
|
||
jQuery( document ).ready( function() { | ||
self.init(); | ||
}); | ||
|
||
|
||
}() ); | ||
(function () { | ||
var self = this; | ||
|
||
this.events = function () { | ||
// Add parent class to items with sub-menus | ||
jQuery("ul.sub-menu").parent().addClass("parent"); | ||
|
||
var mobilemenu_instance = jQuery(".nav-horizontal").data("dlmenu"); | ||
|
||
if (window.matchMedia("screen and (max-width: 1024px)").matches) { | ||
if (!mobilemenu_instance) { | ||
jQuery(".nav-horizontal").dlmenu(); | ||
} | ||
} else { | ||
// action for screen widths below 768 pixels | ||
if (mobilemenu_instance) { | ||
jQuery(".nav-horizontal").dlmenu("destroy"); // kill it | ||
} | ||
|
||
// Enable hover dropdowns for window size above tablet width | ||
jQuery(".nav-horizontal") | ||
.find(".menu li.parent") | ||
.hoverIntent({ | ||
sensitivity: 3, // number = sensitivity threshold (must be 1 or higher) | ||
interval: 100, // number = milliseconds for onMouseOver polling interval | ||
timeout: 200, // number = milliseconds delay before onMouseOut | ||
over: function () { | ||
jQuery(this) | ||
.find("ul.sub-menu") | ||
.first() | ||
.addClass("open"); | ||
}, | ||
out: function () { | ||
jQuery(this) | ||
.find("ul.sub-menu") | ||
.first() | ||
.removeClass("open"); | ||
}, | ||
}); | ||
} | ||
}; | ||
|
||
this.init = function () { | ||
if (typeof jQuery.fn.dlmenu === "undefined") { | ||
return; | ||
} | ||
|
||
self.events(); | ||
|
||
window.addEventListener( | ||
"orientationchange", | ||
function () { | ||
self.events(); | ||
}, | ||
true | ||
); | ||
|
||
jQuery(window).smartresize(function () { | ||
self.events(); | ||
}); | ||
}; | ||
|
||
jQuery(document).ready(function () { | ||
self.init(); | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.