Fixed a weird error involving RegEx and single quotes

This commit is contained in:
benmcmahon100
2015-08-14 21:45:25 +01:00
parent d0b5bcd0b0
commit f07f74f523

View File

@ -333,33 +333,31 @@ $(document).ready(function() {
if(magiVal < 0){ if(magiVal < 0){
magiVal = 0; magiVal = 0;
} }
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
if(magiVal < 0){
magiVal = 0;
}
$('.editorScrollDiv').css("height", (magiVal-85) + "px"); $('.editorScrollDiv').css("height", (magiVal-85) + "px");
} }
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height()); magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
if(magiVal < 0){ if(magiVal < 0){
magiVal = 0; magiVal = 0;
} }
$('.scroll-locker').css("min-height", $('.editorScrollDiv').height()).css("height",magiVal-85);
console.log(magiVal);
$('.scroll-locker').css("min-height", $('.editorScrollDiv').height()).css("height",magiVal-185);
} }
else { else {
$('.editorScrollDiv').css("max-height", 500 + "px"); $('.editorScrollDiv').css("max-height", 500 + "px");
$('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden'); $('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%');
} }
} }
if ($('.scroll-locker').offset()){ if ($('.scroll-locker').html()){
$(document).ready(function(){ $('.scroll-locker').css('overflow-y', 'auto').css('overflow-x', 'hidden')
lockTop(); lockTop();
$(window).on('resize', function(){ $(window).on('resize', function(){
lockTop(); lockTop();
}); });
$(window).scroll(function() { $(window).on('scroll', function() {
lockTop(); lockTop();
}); });
});
} }
} }
}); });