This segment will use information gathered from the previous speed detection segment to present different images based on speed. While there may be better, more complicated ways to achieve this (e.g. with jQuery), this code is meant to be easily used without extensive programming knowledge or resources.
Code is deliberately not working and will be made to work during session.
When prompted, please COPY the following links:
This code requires the Javascript to sit below where it will be displayed.
On LibGuides, content items that are exclusively code look "blank."
The page needs to be reloaded after code changes to see if it works.
<img id="myImage" alt="This is an example of images changing based on internet speed.">
Please note that to make this segment easier and faster, the imageAddr and downloadSize variables are already filled in with the speed test image information.
Alexas_Fotos (n.d.). Rubber duck school-leaving - Free photo on Pixabay [Image file].
Shadow The Princess Wizard. (2011, April 3). Message posted to StackOverflow.