小编Kha*_*war的帖子

如何加载页面然后运行jQuery函数?

在母版页上,我将此代码放在同一母版页中加载页面,然后运行jQuery函数

这是我的主页面标记:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!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>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery-1.4.2.js" type="text/javascript"></script>

    <script type="text/javascript">

    $(document).ready(function() {
        $("#mainContactLink").click(function() {
       $(body).open("about-us.aspx", self);
            $("#mainContTable #abtContacts").fadeIn(1000).siblings("div").fadeOut(100);
            $("#mainContTable #abtContacts").siblings();
        });
    });

</script>
</head>
<body>
    <form id="form1" runat="server">

    <div id="mainContainer">
    <div id="subContainer">
    <div id="topNavigation">
    <ul id="topNav">
    <li><a href="Default.aspx">Home</a>

    </li>
    <li><a href="awards.aspx">Awards</a></li>
    <li><a href="projects.aspx">Projects</a>

    </li>
    <li><a href="NewsDetails.aspx">News</a></li>
    <li><a href="profile.aspx">Profile</a></li>
    <li><a href="about-us.aspx">About Us</a></li>
    </ul>

    </div>
    <div id="logoDiv"> …
Run Code Online (Sandbox Code Playgroud)

jquery load function

0
推荐指数
1
解决办法
1198
查看次数

标签 统计

function ×1

jquery ×1

load ×1