can browsers select scripts based on user's viewing resolution?
I want to implement a JQuery script that requires the browser's width at 100% which depends solely on the user's viewing resolution. Can i prepare multiple scripts for the different resolutions for the browser to automatically detect and choose or does there need to be a single script with if/then clause开发者_StackOverflows?
Apparently the can via Javascript using screen.width and screen.height.
While I don't know what exactly you are trying to implement, you might want to look into CSS media queries as an interesting approach to adaptive Layouts.
精彩评论