Fancybox jquery无法在gridview的emptydatatemplate中工作。可能因为它没有加载$(document).ready本身,即页面加载 [英] Fancybox jquery not working inside the emptydatatemplate of a gridview. May be since it's not loading with $(document).ready itself i.e, on page load

查看:72
本文介绍了Fancybox jquery无法在gridview的emptydatatemplate中工作。可能因为它没有加载$(document).ready本身,即页面加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从http://fancybox.net/howto选择了Fancybox Jquery,但它在我的某个页面中无效。实际上,我希望它像Linkbutton一样工作---->图像库(弹出)---->图库中的每个图像都是原始大小,两侧都有导航箭头(另一个弹出窗口)



但是对于我来说,在Linkbutton点击后,图库用缩略图打开精细。但点击缩略图后,图像不会打开导航箭头。打开就像图像重定向一样,即每次点击打开一个URL重定向。



I picked "Fancybox Jquery" from http://fancybox.net/howto but it is not working in one of my page. Actually, I aspire it to work like a Linkbutton ----> Gallery of images (Pop up) ----> Each of the image from Gallery in original size with navigation arrows on both sides (another Pop up)

But for me, after the Linkbutton click, gallery is opening with thumbnails fine. But after a thumbnail get clicked, images are not opening with navigation arrows. Opening just as an image redirection ie, opening as URL redirection one image for each click.

<script type="text/javascript">
        $(document).ready(function () {
            $("a.fancybox").fancybox();
        });







<asp:Panel ID="TourPoster" runat="server" Visible="false">
            <div class="Referral1">
                <table>
        <tr><th class="Title" style="text-align: center;">Sample Tournament Posters<asp:ImageButton runat="server" ImageUrl="~/StyleSheets/Images/CloseButton.png" ImageAlign="Right" OnClick="LBSampleTournPostersClose_Click" /></th></tr>
        <tr>
            <td>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample1.jpg"><img src="/Images/Samples/Sample1.jpg" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample2.jpg"><img src="/Images/Samples/Sample2.jpg" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample2.png"><img src="/Images/Samples/Sample2.png" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample3.jpg"><img src="/Images/Samples/Sample3.jpg" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample4.jpg"><img src="/Images/Samples/Sample4.jpg" alt=""/></a>
            </td>
        </tr>
</table>
        </div>
</asp:Panel>





代码是否有任何错误?我甚至尝试过修改内部





Is there any mistake with the code? I have even tried modifying inside

<script type="text/javascript">
        $(document).ready(function () {
            $("a.fancybox").fancybox();
 });





它太不起作用了。请帮助



我尝试了什么:



我甚至尝试过修改内部



< script type =text / javascript>

$(document).ready(function(){< br $>
$(a.fancybox)。fancybox();

});



但它没有不会影响事物。



It's too not working. Kindly help

What I have tried:

I have even tried modifying inside

<script type="text/javascript">
$(document).ready(function () {
$("a.fancybox").fancybox();
});

but it doesn't affect a thing.

推荐答案

(document).ready(function(){
(document).ready(function () {


(a.fancybox ).fancybox();
});
("a.fancybox").fancybox(); });







<asp:Panel ID="TourPoster" runat="server" Visible="false">
            <div class="Referral1">
                <table>
        <tr><th class="Title" style="text-align: center;">Sample Tournament Posters<asp:ImageButton runat="server" ImageUrl="~/StyleSheets/Images/CloseButton.png" ImageAlign="Right" OnClick="LBSampleTournPostersClose_Click" /></th></tr>
        <tr>
            <td>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample1.jpg"><img src="/Images/Samples/Sample1.jpg" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample2.jpg"><img src="/Images/Samples/Sample2.jpg" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample2.png"><img src="/Images/Samples/Sample2.png" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample3.jpg"><img src="/Images/Samples/Sample3.jpg" alt=""/></a>
                <a class="fancybox" rel="group" href="/Images/Samples/Sample4.jpg"><img src="/Images/Samples/Sample4.jpg" alt=""/></a>
            </td>
        </tr>
</table>
        </div>
</asp:Panel>





代码是否有任何错误?我甚至尝试过修改内部





Is there any mistake with the code? I have even tried modifying inside

<script type="text/javascript">


(document).ready(function(){
(document).ready(function () {


这篇关于Fancybox jquery无法在gridview的emptydatatemplate中工作。可能因为它没有加载$(document).ready本身,即页面加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆