我在一个页面上初始化了多个 CalHeatMap 对象:
....
{% for row in queryset %}
var cal{{ forloop.counter }} = new.CalHeatMap();
cal{{ forloop.counter }}.init(
{id:"cal{{ forloop.counter }}", itemSelector: "#previousSelector-a", previousSelector: "#previousSelector-a-previous", domain: 'day', subDomain:'hour', colLimit: 24, range: 4, displayLegend: false, domainLabelFormat: ""}
);
{% endfor %}
....
{% for row in queryset %}
<div id="cal{{ forloop.counter }}"></div>
{% endfor %}
<div id="previousSelector-a" style="nullposition:relative;">
<button class="btn" id="previousSelector-a-previous">Previous</button>
</div>
但我希望能够使用上一个和下一个选择器,这样当我点击它们时,它们会推进所有日历,而不仅仅是像现在这样的最后一个日历?