How to redirect to screen size using JQUERY?
-
How to use JQUERY to redirect in real time if the screen size is less than 1200 px?JavaScript Anonymous, Nov 28, 2019
-
$(document).ready(function() {
$(window).resize(function() {
if ($(window).width() <= '1200'){
$(location).attr('href', 'https://www.google.com/')
}
});
});Anonymous
1 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!