I don't write a lot of Javascript code, but
a friend wanted some help with website stuff and I'm always happy to help, so I wrote some code for her. I'm sharing it here for archival reasons, but also if anyone happens to stop by and is interested in implementing this logic themselves.
You will need some familiarity with HTML, CSS, and algorithmic code for this. I will not be explaining it in detail here.
What this code does: For each in-page click with the corresponding ID, a random image will be selected and changed per click. At the same time, text elsewhere on the page will also change, per the webmaster's preset settings.
What this code is for: Websites that utilize iframes as internal navigation, in order to allow the title of the page, not within the iframe, to change; simultaneously this allows the random image to change with each new iframe navigation without leaving or refreshing the page.
( Read more... )