Click here to Skip to main content
15,917,632 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I've a gridview in .aspx page. Grid is bounded by image. Now I want to zoom this image when users do mouseover on the image in grid.
I'm using ElevateZoom jQuery. But it's not working.
This is my code.

HTML
<html>
<head runat="server">
    <title></title>
    <script src="elevateZoom.js" type="text/javascript"></script>
    <script type="text/javascript">
        $("#imgViewImage").elevateZoom();
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="grdImage" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
            ForeColor="Black" OnRowDataBound="grdImage_RowDataBound" AllowPaging="True" PageSize="5">
            <Columns>
                <asp:TemplateField HeaderText="Image">
                    <ItemTemplate>
                        <img id="imgViewImage"  runat="server" alt="" src='<%# Eval("ImagePath") %>' height="75"
                            width="75" data-zoom-image='<%# Eval("ImagePath") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>

Please help me out. Thanks in advance.
Posted
Updated 30-Jul-13 2:58am
v4
Comments
Can you check if you see any errors on FireBug console window or not?
Member 13051139 7-May-17 21:54pm    
the
not work

Hi...
Using JScript.
<script type="text/javascript" language="javascript">
    $(function () {
        $("img").elevateZoom();
    });
              </script>
Thank u.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900