Only fire equal heights js on screens larger than 640px.
The equal heights boxes look weird on small screens, so we're not firing the plugin there any longer. This introduces a new variable for breakpoints for responsive JS. Please *only* add more breakpoints if you actually use them. References #100
This commit is contained in:
@ -826,6 +826,9 @@ var AccessifyHTML5 = function (defaults, more_fixes) {
|
|||||||
}(document, jQuery));
|
}(document, jQuery));
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
// Breakpoints for responsive JS
|
||||||
|
var mq_small = matchMedia("(min-width:640px)");
|
||||||
|
|
||||||
// Fire responsive nav
|
// Fire responsive nav
|
||||||
if($('#main_menu').length > 0) {
|
if($('#main_menu').length > 0) {
|
||||||
$('#nav-toggle').click(function(e) {
|
$('#nav-toggle').click(function(e) {
|
||||||
@ -1327,15 +1330,17 @@ $(function() {
|
|||||||
|
|
||||||
// Equal Heights
|
// Equal Heights
|
||||||
$(window).load(function() {
|
$(window).load(function() {
|
||||||
if($('.equal_heights').length > 0) {
|
if (mq_small.matches) {
|
||||||
if($('html').hasClass('lt-ie9')) {
|
if($('.equal_heights').length > 0) {
|
||||||
$('.equal_heights').syncHeight({
|
if($('html').hasClass('lt-ie9')) {
|
||||||
updateOnResize: false
|
$('.equal_heights').syncHeight({
|
||||||
});
|
updateOnResize: false
|
||||||
} else {
|
});
|
||||||
$('.equal_heights').syncHeight({
|
} else {
|
||||||
updateOnResize: true
|
$('.equal_heights').syncHeight({
|
||||||
});
|
updateOnResize: true
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user