if ($(window).width() >= 320 && $(window).width() <= 480) {
$(".projects").slice(0, 8).css("margin", "10px");
} else if ($(window).width() > 480){
$(".projects").slice(3, 6).css("margin", "10px");
};
How can I reset from a slice of 0.8 to the default when windows are larger than 480? Because when you resize, the rules for 0.8 slice are still active? I want the default if more than 480, how can this be done?
source
share