I think .show()
is not needed anymore since you already slideToggle()
the display has been changed to block
. With window.screen.width
your trying to get the device native screen resolution so use $(window).width()
instead.
$(document).ready(function(){
$('#mobile').click(function(){
$( "#fripple" ).slideToggle();
$( "#site-navigation" ).slideToggle();
$( "#secondary" ).slideToggle();
if($(window).width() < 850){
$( "#fripple" ).slideUp();
$( "#site-navigation" ).slideUp();
$( "#secondary" ).slideUp();
}
});
});