It is necessary to ensure that when the screen width is less than 1025px
user flips to another page. If less, <iframe>
is inserted into the current page.
Wrote, but the condition does not work:
if (window.location.href == "такая-то ссылка").innerWidth < 1025 { $('.container').append('<iframe src="какой-то iframe"></iframe >'); } else { window.location = "на определенную страницу"; }
How to write this line correctly: if (window.location.href == "такая-то ссылка").innerWidth < 1025
?
при маштабе экрана менше 1025px, ..., если меньше, ...
And what if more? - Peter Olson