I know this can be done through Dreamweaver but is it possible to have a layer or div show and hide depending on the mouse action? Are there any similar scripts or tutorials about this kind of thing?
What I need to happen:
When a user clicks an image, in the right-hand column some info appears. When the user clicks another image, the previous info hides and the new info appears.
Could this be done through a simple query using an image map to generate the WHERE variable?
We can do this easily by div. See below example script.
function togglediv(mode)
{
if(mode=='show')
{
document.getElementById('divname').style.display = block;
//this will appear div
}
elseif(mode=='hide')
{
document.getElementById('divname').style.display = none;
//this will disappear div
}
}
<img src="abc.jpg" onclick="togglediv('show')"><BR>
<img src="abc.jpg" onclick="togglediv('hide')">
<div style='display:none' id='divname'></div>
Bookmarks