有誰知道添加一些JQuery的方式,將允許用戶懸停在Razor的foreach循環中動態創建的UNKNOWN ID?當圖像被隱藏或懸停並執行.show()時,我需要獲取id;爲那個形象。我在其他頁面上使用一個圖像工作,但無法弄清楚對於許多未知ID的圖像要做什麼。MVC 4剃刀圖像鼠標放大顯示
這裏是圖像的div有兩個圖像。完整的圖像顯示在較小的圖像上,並且在鼠標移出或沒有懸停時消失。
<div class="listEntriesPhoto" style="display:inline-block; vertical-align:top;">
<img id="[email protected]" src='~/documents/@item.ImageName' alt="repeating default photo of woman" />
<!--This is for image hover for larger picture-->
<div id="[email protected]" style="display:none;" >
<img id="[email protected]" src='~/documents/@item.ImageName' alt="Submitted image"/>
</div>
</div>
任何幫助將是偉大的,並提前感謝!
是類 「listEntriesPhoto」 根div元素? – Jared