I have a bottom of the browser hugging thing, that does not scroll, that is bad user experience for mobile and tablet devices. I would like to exclude them by detecting width/height and have found references to using this
function detectmob() { if(window.innerWidth <= 800 && window.innerHeight <= 600) { return true; } else { return false; }
Being a trial and error type reviser of existing js, I am unsure how to use that function in the following, to say “do nothing” or “abort”. Any and all suggestions or directions, much appreciated.
The plugin
http://meerkat.jarodtaylor.com/wp-content/themes/meerkat-default/js/jquery.meerkat.1.3.js
$(function(){
$('.meerkat').meerkat({
background:'url(\'http://someimage.jpg\') repeat-x left top',
height: '90px',
width: '940px',
position: 'bottom',
close: '.close-meerkat',
dontShowAgain: '.dont-show',
animationIn: 'fade',
animationSpeed: 1000,
removeCookie: '.reset'
}).addClass('pos-bot');
$('#bottom').click(function(){
$('.meerkat').destroyMeerkat();
$('.meerkat').meerkat({
height: '90px',
width: '940px',
position: 'bottom',
close: '.close-meerkat',
dontShowAgain: '.dont-show',
animationIn: 'slide',
animationSpeed: 1000,
removeCookie: '.reset'
}).removeClass('pos-bot');
$('.code').hide();
$('.bottom_').show();
return false;
});
});