我有一个应用程序,用户可以在其中查看单元格列表。对于每个单元格,用户可以看到两个单元格图像作为弹出菜单。问题是选择列表时会下载所有图像,这使我的页面非常慢。我希望仅当鼠标悬停在链接上时才下载图像。有关信息:我正在使用 DOM 弹出工具包链接文本
这里是主页和弹出菜单的链接
<div id="span_div">
<span id="cell_link_<%= @cell.cellid %>" class="popup_link" Popup.modal = true><%= @cell.cellname%>
<%= render :partial => 'cell_popup' %>
<%= javascript_tag "new Popup('cell_popup_#{@cell.cellid}','cell_link_#{@cell.cellid}')" %>
</span>
</div>
这里是细胞图像的一部分
<div id="cell_popup_<%= @cell.cellid %>" class="popup popup_draghandle" style="display:none">
<table width="418" border="0">
<tr>
<td width="201" align="center" valign="top">Raw</td>
<td width="201" align="center" valign="top">Repaired</td>
</tr>
<tr>
<td align="center" valign="top">
<% if @full_report == true then%>
<%raw_morph = @raw_morph.last%>
<img src="<%= url_for(:action => 'jpegfile', :controller => 'neuronviewer',:morph_id => raw_morph.morphologyid)%>" alt="" width="200" height="200"/>
<%end%>
</td>
<td align="center" valign="top">
<%if @repaired == true then%>
<%repaired_morph = @repaired_morph.last%>
<img src="<%= url_for(:action => 'jpegfile', :controller => 'neuronviewer', :morph_id => repaired_morph.morphologyid)%>" alt="" width="200" height="200"/>
</td>
</tr>
<%end%>
</table>
有人有什么想法吗?