Jcfg.J Jcfg.J - 1 year ago 79
Javascript Question

Change HTML file based off of Screen Width

So I have a website, and I want to have different versions of the site that adjust to the screen width. I realize that I can use different style sheets and such to do so, but I am curious if I can do a cleaner method that just goes to a different HTML file depending on the width.

Ex (pseudo-code):

if (width > 900) go to largeSite.html... else if (width < 900 && width > 500) go to mediumSite.html etc..

Answer Source

I think JavaScript can help.

Image :  enter image description  here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download