I am putting in my media queries for my website and would like to change a rule. Currently my rule is this:
<script>
(function($){
$(document).on('click', '.container', function(){
$(this).addClass('active');
$('.container:not(.active):eq(0)').animate({top: -1258, left: 50});
$('.container:not(.active):eq(1)').animate({top: 1258, left: -50});
if (this.id == 'center' || this.id == 'left') {
$('.menu').addClass('red');
}
});
$(document).on('click', '.container.active', function(){
$('.container:not(.active):eq(0)').animate({top: 0, left: 0});
$('.container:not(.active):eq(1)').animate({top: 0, left: 0});
$(this).removeClass('active');
$('.menu').removeClass('red');
});
})(jQuery);
</script>
I want to say when my screen has a max width of 400px animate top:50 and left 1258.
Is there a way to do this?