In this article, we will be discussing the Fisheye menu effect in JavaScript. For this follow these steps:
Step 1: First we create a table and use five images in it like this:
- <table cellpadding="5" cellspacing="5">
- <tr>
- <td><img id="img1" src="Tulips.jpg" height="100pt" width="100pt" style="border: 2px solid black;" onmouseover="Show1()" /></td>
- <td> <img id="img2" src="Desert.jpg" height="100pt" width="100pt" style="border: 2px solid black;" onmouseover="Show2()" /></td>
- <td><img id="img3" src="Hydrangeas.jpg" height="100pt" width="100pt" style="border: 2px solid black;" onmouseover="Show3()" /></td>
- <td><img id="img4" src="Jellyfish.jpg" height="100pt" width="100pt" style="border: 2px solid black;" onmouseover="Show4()" /></td>
- <td><img id="img5" src="Koala.jpg" height="100pt" width="100pt" style="border: 2px solid black;" onmouseover="Show5()" /></td>
- </tr>
- </table>
Output
Step 2: In the previous step we call the JavaScript functions, so now we will write the JavaScript functions like this: