Click here to Skip to main content
15,891,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I place a <script src="" type="text/Javascript"></script>
in the Head Section of Master Page After That I want to Use the FadeIn() and FadeOut() method in the Master Page for Button Control.....




Suggest me Simple Example............
Posted

First download jquery plugins. Save it to your project folder.
then on Master page give the path of your jquery plugin.

your path will be something like this:-

HTML
<script src="yourfoldername/jquery-1.7.2.min.js" type="text/javascript"></script>


Remember that my jquery plugin version is 1.7.2.min

Or you can use online library :-

HTML
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">


then write your code like this :-

JavaScript
 <script>
 $(document).ready(function(){
  $("button").click(function(){
    $("#div1").fadeIn();
    $("#div2").fadeIn("slow");
    $("#div3").fadeIn(3000);
  });
});
</script>


hope you got it.

Happy holi.
 
Share this answer
 
Comments
Faiyaz Shaikh 27-Mar-13 5:30am    
The Button Control on Master Page by Clicking the Button Control I want to FadeOut() for Div1 of Content PAge ..........
please reply me fast...........
Refer the jQuery library in the header. Then call the any of jQuery function just after that reference.
 
Share this answer
 
You can try this.. for including javascript in master-page

<script type="text/javascript" src="<%= Page.ResolveClientUrl("~/jquery-1.4.2.js %>"></script

OR

<script type="text/javascript" src<%=Request.ApplicationPath+"/Scripts/Script_Name"%>></script>

OR

<script src="<%# ResolveUrl("~/") %>Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>

And then call the appropriate method..
 
Share this answer
 
v2
XML
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="OnlineIT.master.cs" Inherits="OnlineIT" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <script src="jquery-1.9.1.min.js" type="text/javascript"></script>

   <script type="text/javascript">

   </script>

    <style type="text/css">
        .style1
        {
            width: 100%;
            height: 653px;
            margin-bottom: 0px;
            margin-right: 104px;
        }
        .style3
        {
            height: 618px;
            width: 262px;
        }
        .style4
        {
            height: 45px;
        }
        .style6
        {
            height: 618px;
            width: 1007px;
        }
        .style8
        {
            width: 95%;
            height: 129px;
        }
        .style10
        {
            width: 112px;
            height: 28px;
        }
        .style16
        {
            width: 112px;
            height: 34px;
        }
        .style17
        {
            height: 34px;
        }
        .style18
        {
            height: 28px;
        }
        .style19
        {
            width: 112px;
            height: 31px;
        }
        .style20
        {
            height: 31px;
        }
        .style21
        {
            width: 112px;
            height: 32px;
        }
        .style22
        {
            height: 32px;
        }
        .style30
        {
            width: 102px;
            height: 33px;
        }
        .style31
        {
            width: 88px;
            height: 33px;
        }
        </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="height: 650px; width: 1254px; margin-right: 60px; margin-bottom: 14px;">
        <table class="style1">
            <tr>
                <td class="style4" colspan="2" bgcolor="#9900CC">
                    <h1  style="width: 1150px; font-variant: small-caps;" align="center" >Online IT Examination</h1>
</td>
            </tr>
            <tr>
                <td class="style3" bgcolor="#FFCC99">
                    <table class="style8" frame="box">
                        <tr>
                            <td class="style16" bgcolor="White">
                                College Index No:</td>
                            <td class="style17" bgcolor="White" >
                                                <asp:Label ID="lblCollegeIN" runat="server" ondatabinding="Page_Load">Label</asp:Label>
                                </td>
                        </tr>
                        <tr>
                            <td class="style21" bgcolor="White" >
                                Seat No:</td>
                            <td class="style22" bgcolor="White">
                                                <asp:Label ID="lblSeatNo" runat="server" ondatabinding="Page_Load"></asp:Label>
                                </td>
                        </tr>
                        <tr>
                            <td class="style19" bgcolor="White">
                                <font size="3" color="green">Green Button</font></td>
                            <td class="style20" bgcolor="White">
                                <font size="3" color="green">Page Submitted</font> </td>
                        </tr>
                        <tr>
                            <td class="style10" bgcolor="White">
                                <font size="3" color="Orange">Orange Button</font></td>
                            <td class="style18" bgcolor="White">
                                <font size="3" color="Orange">Current Page</font></td>
                        </tr>
                    </table>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
                    <table class="style8" frame="box" >
                        <tr>
                            <td class="style30" >
                                <asp:Button ID="Q1" runat="server" Height="29px" Text="Q1" Width="55px"
                                     onclick="Q1_Click"/>
                            </td>
                            <td class="style31" >
                                <asp:Button ID="Q2" runat="server" Text="Q2" Height="29px" Width="55px" onclick="Q2_Click"
                                     />
                            </td>
                        </tr>
                        <tr>
                            <td class="style30" >
                                <asp:Button ID="Q3" runat="server" Text="Q3" Height="29px" Width="55px"
                                    onclick="Q3_Click" />
                            </td>
                            <td class="style31" >
                                <asp:Button ID="Q4" runat="server" Text="Q4" Height="29px" Width="55px"
                                    onclick="Q4_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td class="style30">
                                <asp:Button ID="Q5" runat="server" Text="Q5" Height="29px" Width="55px"
                                    onclick="Q5_Click"/>
                            </td>
                            <td class="style31">
                                <asp:Button ID="Q6" runat="server" Text="Q6" Height="29px" Width="55px"
                                    onclick="Q6_Click"/>
                            </td>
                        </tr>

                    </table>
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="Sub_Btn" runat="server" Height="43px" Text="Submit"
                        Width="137px" onclick="Sub_Btn_Click" Visible="False" />
                    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button  ID="GiveUp_Btn" runat="server"  Height="45px" Text="Give Up"
                        Width="138px" />
                </td>
                <td class="style6">
                    <asp:ContentPlaceHolder ID="Pages" runat="server">



                        <p>
                            <br />
                        </p>
                        <p>
                            &nbsp;</p>
                        <p>
                            &nbsp;</p>
                        <p>
                            &nbsp;</p>
                        <p>
                        </p>



                    </asp:ContentPlaceHolder>
                </td>
            </tr>
            </table>
    </div>
    </form>
</body>
</html>
 
Share this answer
 

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