Presently the code on my site will, once the main image is clicked, check the screen resolution and then open a website depending on the one that best fits the webpage created for its dimension e.g. 1024x768, 800x600... I placed that dimension checking code into a function and then made the image a button to call it, but before I did that the code would automatically run when the user loads the page and I would like to get that back.
How do I modify the code so that the resolution check and launching of the correct website happens on page load while also performing the same action if the main image is pressed on the page as now?
Many thanks.
How do I modify the code so that the resolution check and launching of the correct website happens on page load while also performing the same action if the main image is pressed on the page as now?
Many thanks.