I'm doing responsivity on my website in JS. How can I change this (normal resolution):
$(".card1_content_arrow").click(function () {
$(".card1_content").css('margin-left', '-45%');
});
Into this, when media width is <860px (in css @media all and (max-width: 860px)):
$(".card1_content_arrow").click(function () {
$(".card1_content").css('margin-left', '-100%');
});
When I click on .card1_content_arrow
on big resolution, then margin-left
will be changed to -45%'
, but if I will change the resolution to 860px (and less) I want, that when I click on same .card1_content_arrow
, then margin-left
will be changed to -100%
.
Thanks :)