jquery - On Mouseover show large Images without Distortion -


on mouseover show large images without distortion images come database using php question simple method there in jquery css javascript etc simplest thanks.

this code images shows database

     <div>    <table> <tr>   <td>     ?php     $query = "select * images";    $result = mysql_query($query);   while($fetch = mysql_fetch_array($result)) {   echo "<img src=\"http://localhost/images_path/{$fetch['image']}\" width=\"15%\"     height=\"135px\">"." &nbsp"; } ?>  </td> </tr>  </table>  </div> 

you can simple css..

div.img img { height: 90px; width: 110px; } div.img img:hover { height: auto; width: auto; } 

another method maybe

function mouseover() { var img1 = document.getelementbyid("img1"); img1.src ="images/p2.jpg"; img1.width = ""; img1.height = ""; } function mouseout() { var img1 = document.getelementbyid("img1"); img1.src ="images/p1.jpg"; img1.width = "90"; img1.height = "110"; } 

also have @ jsfiddle demo


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -