【发布时间】:2013-08-01 15:51:06
【问题描述】:
我正在尝试调用 google-jquery 和 ektron 中的一些内联脚本/样式标签。我是 CMS 的新手,这可能吗?代码如下:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#accordion-js').find('h2').click(function(){
$(this).next().slideToggle();
}).next().hide();
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#accordion-js').find('h2').toggle(function(){
$(this).css("background-color","#04396D");
$(this).css("background-image","url('101_up.png')");
$(this).css("background-position", "center right");
$(this).css("background-repeat","no-repeat");
$(this).css("color","#FFF");
},
function(){
$(this).css("background-color","#f4f4f4");
$(this).css("background-image","url('101_down.png')");
$(this).css("background-position", "center right");
$(this).css("background-repeat","no-repeat");
$(this).css("color","#777");
});
});
</script>
【问题讨论】:
-
我有点不清楚您要做什么。看起来您已成功包含 jquery 并正在使用它。您的问题是如何使用上述代码在 Ektron 中创建切换手风琴?要使用上面的代码,只需将它放在您的 ASPX 模板中,它就会像在任何 webforms 应用程序中一样运行。