我試圖在ektron中調用google-jquery和一些內聯腳本/樣式標記。我是CMS的新手,這甚至有可能嗎?代碼如下:Ektron中的內聯腳本標記/ JQuery
<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應用程序一樣運行。 – MaxPRafferty