I want to use this jquery only on resposive template and want to disable it in desktop and laptop screen width
$(document).ready(function() {
$('a.searchkey').click(function(){
$('.search').slideToggle('fast');
$(this).toggleClass('active');
});
});
$(window).scroll(function() {
if ($(this).scrollTop() > 10){
$('.search').hide('fast');
}
});
$(document).ready(function() {
$(window).scroll(function() {
if ($("body").height() <= ($(window).height() + $(window).scrollTop())) {
$('.bottom_menu').hide();
}else {
$(this).scrollTop() > 10
$('.bottom_menu').show('fast');
}
});
});
I want this code only work in windows width < 1000 and i have tried that code as well but it didn't work
$(window).resize(function() {
if ($(this).width() < 1000) {
$(document).ready(function() {
$('a.searchkey').click(function(){
$('.search').slideToggle('fast');
$(this).toggleClass('active');
});
});
$(window).scroll(function() {
if ($(this).scrollTop() > 10){
$('.search').hide('fast');
}
});
$(document).ready(function() {
$(window).scroll(function() {
if ($("body").height() <= ($(window).height() + $(window).scrollTop())) {
$('.bottom_menu').hide();
}else {
$(this).scrollTop() > 10
$('.bottom_menu').show('fast');
}
});
});
}
});