我需要使用Jquery在Spotfire中执行可折叠过滤器的代码。我不太了解jquery,但我猜它与在文本区域实现Javascript相同。
答案 0 :(得分:2)
你可以使用jquery accordian。
<DIV id="accordian">
<H3>Filter1</H3>
<DIV>
<p style="DISPLAY: block">
<SpotfireControl id="f4b03c6669c94865b3faa23d9f360160" />
</p>
</DIV>
<H3>Filter2</H3>
<DIV>
<p style="DISPLAY: block">
<SpotfireControl id="78690b9955944fe2804b1ba2de1fb9c2" />
</p>
</DIV>
<H3>Filter3</H3>
<DIV>
<p style="DISPLAY: block">
<SpotfireControl id="54dc77ac79c548fe96216e218d7dd07f" />
</p>
</DIV>
<H3>Filter4</H3>
<DIV>
<p style="DISPLAY: block">
<SpotfireControl id="ffa344dc2fa64b1696afbae0e99c88b1" />
</p>
</DIV>
</DIV>
注意:使用你的spotfire控件(过滤器)id 2)使用以下javascript
//Declaring Variables
//Accordian variables
var headBkgColor = "#848484";
var leftContentMargin = "-20px";
//Applying accordian
$("#accordian").accordion({
heightStyle: "content" ,
collapsible: true
});
//Applying CSS
//Header background color
$(".ui-accordion .ui-accordion-header").css({
"background": headBkgColor
});
//Left content margin
$("#accordian p").css({
"margin-left":leftContentMargin
});