After experimenting with JavaScript to switch images, I now want to explore how to do the same with text.
My dilemma lies in having 10 different paragraphs (where each link corresponds to a specific paragraph), but I'm unsure of where to input these paragraphs. While my images are linked to existing files, I want my text to remain text, and I am uncertain as to how to assign this in CSS or HTML.
CODE USED:
Currently, I have CSS code to define my text content that will change upon clicking, along with the map content where the text changes are controlled:
#content
#content div {float:left;}
#content_map {width:595px;}
#content_text {width:290px;;}
#content_profile {width:900px;}
For instance, my current html for map 'hotspots' looks like:
<area shape="circle" coords="276,326,15" href="#" alt="Kinnloch" onclick="MM_swapImage('stboswells_01','','discover_kinnloch.png',1)"/>
<area shape="circle" coords="202,264,11" href="#" alt="Lochinver" onclick="MM_swapImage('stboswells_01','','discover_lochinver.png',1)"/>
... etc
Essentially, I am currently swapping images in the 'profile' div based on coordinates from the 'map' div. What I aim to achieve is to also swap text in my 'text' div using these coordinates. For example, the first set of coordinates would change the text to 'Paragraph 1,' while the second set would change it to 'Paragraph 2,' and so on...