So I am currently trying to develop for my website a way to detect if the user has shrunk screen-sizes (desktop only), is there a way for wix code to detect if they screen size has shrunk and automatically update certain objects to become collapsed or hidden if the screen is shrunk at all?
Currently this is what I am trying to do.
if (wixWindow <= 948) {
if ((‘#anchorMenu1’).collapsed() !== false ) {
$w(‘#anchorMenu1’).collapse();
//Expand Page elements…
}
} else if (wixWindow <= 1280) {
if ((‘#anchorMenu1’).collapsed() !== false ) {
$w(‘#anchorMenu1’).collapse();
//Expand Page elements…
}
} else if (wixWindow > 1280) {
if ((‘#anchorMenu1’).collapsed()) {
$w(‘#anchorMenu1’).expand();
//Expand Page elements…
}
}
Essentially collapsing the anchorMenu so it doesn’t collide with other objects on screen? Anyone have a work around for this?