I would like to add a script that says if the window.location.origin is no equal to "http://www.mymobilesite.com" and the screen resolution is less than or equal to 600 then redirect to "http://www.mymobilesite.com"
I have been able to create each statement separately but still learning and when I go to combine them with && I get stuck. I can get it to redirect to mymobilesite.com but it still redirects even if the origin is mymobilesite.com Any help would be greatly appreciated! :)
Here is what I have been working on:
if ((window.location.origin != "http://www.mymobilesite.com") && ($(window).width() <= 600)) {
location.href = "http://www.mymobilesite.com"
}