jQuery和内容占位符 [英] jQuery and content place holder
本文介绍了jQuery和内容占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.
我的母版页中有一个内容占位符,还有几个内容页.
在内容页面中,我具有动态的内容,其中包含1个用户控件和一些其他Web控件.现在我想用以下脚本通过jquery更改Content Placce Holder的高度,但是不起作用:
Hi.
i have a content place holder in my master page and a have several content pages .
in content pages i have dyanamic contents that contains 1 user control and some other web controls . now i want to change Content Placce Holder height by jquery with following script but dont work :
$(document).ready(collapsibleInit);
function collapsibleInit() {
var height1 = $("#<%=cphInfo.ClientID %> .tblFormInfo").height();
$("#<%=cphInfo.ClientID%>").height(0);
$("#<%=pnlCommand.ClientID %>").toggle(function () {
$("#<%=pnlCommand.ClientID %> span").text(">");
$("#<%=cphInfo.ClientID %> .tblFormInfo").fadeIn('slow');
$("#<%=cphInfo.ClientID %>").animate({ "height": height1 + 50 }, 1000);
},
function () {
$("#<%=pnlCommand.ClientID %> span").text("<");
$("#<%=cphInfo.ClientID %> .tblFormInfo").fadeOut('slow');
$("#<%=cphInfo.ClientID %>").animate({ "height": "0" }, 1000);
});
推荐答案
(文档).ready(collapsibleInit); 函数 collapsibleInit(){ var height1 =
(document).ready(collapsibleInit); function collapsibleInit() { var height1 =
(" ).height();
("#<%=cphInfo.ClientID %> .tblFormInfo").height();
( " ).height( 0 );
("#<%=cphInfo.ClientID%>").height(0);
这篇关于jQuery和内容占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文