hide and show div on click
I have the following php code:
PHP Code:
$files = glob('martingallery/*');
natcasesort($files);
foreach($files as $file){
echo '<a href="' . $file . '"><img src="' . $file . '" height="150px" width="auto"/></a>';
}
what I would like it to look like:
PHP Code:
$files = glob('martingallery/*');
natcasesort($files);
foreach($files as $file){
echo '<a onclick="SET THE $FILE DIV TO VISIBLE"><img src="' . $file . '" height="150px" width="auto"/></a>
<div id="' . $file . '" style="visible:noooooooooo;"><img src="' . $file . '" height="auto" width="auto"/></div>';
}