Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Good Afternoon Every One.

I have 5 linkbuttons.when mouseover on linkbutton particular image should be display.here is my code.can anyone tell me please.
thank you.
XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="jquery/jquery-1.10.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {


            $('#link1').mouseover(function () {
                $('#img1').replaceWith("<img src='images/1.JPG' width=200 height=200/>");
            });
            $('#link2').mouseover(function () {
                alert('hi');
                $('#img1').replaceWith("<img src='images/2.JPG' width=200 height=200/>");
            });
            $('#link3').mouseover(function () {
                $('#img1').replaceWith("<img src='images/3.JPG' width=200 height=200/>");
            });
            $('#link4').mouseover(function () {
                $('#img1').replaceWith("<img src='images/4.JPG' width=200 height=200/>");
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
    <img id="img1" />
    <asp:LinkButton ID="link1" runat="server" Text="Pradeep"></asp:LinkButton><br />
    <asp:LinkButton ID="link2" runat="server" Text="deepu"></asp:LinkButton><br />
    <asp:LinkButton ID="link3" runat="server" Text="pandu"></asp:LinkButton><br />
    <asp:LinkButton ID="link4" runat="server" Text="bittoo"></asp:LinkButton><br />
    </div>
    </form>
</body>
</html>
Posted

1 solution

<pre lang="xml">$('.lBtTempClass').mouseover(function() {
///  Do your code
    });

you should add a css class to link button

<asp:LinkButton ID="lBtTempID" CssClass="lBtTempClass" runat="server" >



for more detail visit here...


show an image on mouseove of a link button[^]
 
Share this answer
 
Comments
Joezer BH 10-Sep-13 3:36am    
5ed!

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