我有一個帶有gridview的CollapsiblePanelExtender控件,它放在用戶控件中。用戶控件中的jQuery腳本,僅在該頁面上的該控件的一個實例上運行
我添加下面的腳本在用戶控制結束理順動畫:
<script type="text/javascript">
function pageLoad(sender, args) {
$find(("<%= CPE.ClientID %>"))._animation._fps = 35;
$find(("<%= CPE.ClientID %>"))._animation._duration = 0.5;
}
</script>
當我只運行2日手風琴被平滑掉頁,第一個是默認的低迷。
以下是運行腳本:
<script type="text/javascript">
function pageLoad(sender, args) {
$find(("MainContent_AccordionGV1_CPE"))._animation._fps = 35;
$find(("MainContent_AccordionGV1_CPE"))._animation._duration = 0.5;
}
</script>
。 。 。 。
function pageLoad(sender, args) {
$find(("MainContent_AccordionGV2_CPE"))._animation._fps = 35;
$find(("MainContent_AccordionGV2_CPE"))._animation._duration = 0.5;
}
</script>
所以它應該按照這個工作。 任何想法,爲什麼不是?
謝謝。
增加:
我試圖手動將它添加到網頁,而不是用戶控制,相同的行爲。
<script type="text/javascript">
function pageLoad(sender, args) {
$find(('<%= AccordionGV1.FindControl("CPE").ClientID %>'))._animation._fps = 35;
$find(('<%= AccordionGV1.FindControl("CPE").ClientID %>'))._animation._duration = 0.5;
}
</script>
工作 當我添加同一行,但對於AccordionGV2..the第一個停止工作。
讓我覺得這是一個比這更大的問題。
什麼是調用你的pageLoad函數? – 2013-04-11 08:59:35
其實什麼都沒有。 – AngelicCore 2013-04-11 09:04:30