Looking to adjust the values in a jQuery script based on media query specifications.
HTML
<div id="content">
</div>
JS
$("html,body").animate({scrollTop: 360}, 1000);
Desired Outcome, something like this
@media handheld, only screen and (max-width: 1024px) {
$("html,body").animate({scrollTop: 660}, 1000);
}
@media handheld, only screen and (max-width: 768px) {
$("html,body").animate({scrollTop: 260}, 1000);
}
What is the best approach for achieving this?