2014-02-27 53 views
0

我的頁面有一個包含更多列和行的表。每個行和列都有一個小圖像。 for循環用於調用images.i想要彈出圖像懸停.. 在此先感謝..是否有可能?如何在懸停時彈出圖片?

+2

定義**彈出**。 –

+0

您能否以更具體的方式描述您的需求?這個彈出圖像將如何消失? – Ethen

+0

沒有javascript:http://stackoverflow.com/questions/11683620/how-to-display-pop-up-text-on-mouse-hover 希望它會幫助你。 – monu

回答

0

我能想象這樣的事情在這裏:

$(".image").hover(function(){ 
    //display bigger image here 
}, function() { 
    //hide it here 
}); 

替代,您可以使用CSS :hover

-1

簡單你可以使用像這樣的jQuery的懸停功能

$('img').hover(function(){ 

    $(this).css('width' , '500px'); 
    $(this).css('height' , '500px'); 
},function(){ 

    $(this).css('width' , '200px'); 
    $(this).css('height' , '200px'); 
}) 

,這是圖像的HTML代碼

<div id="main_container"> 
    <div id="div1"> 
     <img src="img/angelinasmall.jpg" style="width: 200px; height: 200px;" /> 
    </div> 
    <div id="div2"> 
     <img src="img/hayden.jpg" style="width: 200px; height: 200px;" /> 
    </div> 
    <div id="div3"> 
     <img src="img/milla.jpg" style="width: 200px; height: 200px;"/> 
    </div> 
</div> 
0

$( 「身體」)上( '鼠標懸停', '#image_id',函數(){

//彈出圖片。

});