網頁位置是
專案名稱\Consumables\InvTrans.aspx
每頁只會有一張圖
搞了老半天,縮圖有出來,點選縮圖超連結,整張圖片有出來,但是直接開啟的狀態
一直沒有jquery的特效
懇請大神們幫幫忙,感謝!
head
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="../fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<!-- Add fancyBox -->
<link rel="stylesheet" href="../fancybox/source/jquery.fancybox.css?v=2.1.7" type="text/css" media="screen" />
<script type="text/javascript" src="../fancybox/source/jquery.fancybox.pack.js?v=2.1.7"></script>
<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="../fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="../fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="../fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>
<link rel="stylesheet" href="../fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="../fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox-thumb").fancybox({
prevEffect : 'none',
nextEffect : 'none',
helpers : {
title : {
type: 'outside'
},
thumbs : {
width : 50,
height : 50
}
}
});
});
</script>
<style type="text/css">
.fancybox-custom .fancybox-skin {
box-shadow: 0 0 50px #222;
}
</style>
body部分
gridview內有一格是縮圖,路徑為SQL提供
<asp:TemplateField HeaderText="附件" SortExpression="ITR_File" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<a class="fancybox-thumb" href='<%# "upload/InvTrans/" + Eval("ITR_File") %>' data-fancybox-group="gallery">
<asp:Image ID="Image1" runat="server" Width="30px" Height ="30"
ImageUrl='<%# "upload/InvTrans/" + Eval("ITR_File") %>'
AlternateText='<%# Eval("ITR_File") %>' />
</a>
</ItemTemplate>
</asp:TemplateField>