<div id="divId_graph" ></div>
<div class="graph" id="graph" style="margin-top:-15px"></div>
controller.js:
$('#graph').svg({ onLoad:drawIntro});
drawIntro
是一个计算值的函数。当我通过改变一些输入值来回忆同一页面中的函数时,它不会调用。
答案 0 :(得分:0)
$.ajax({
type: "GET",
url: "/templates/ch_div_content.html?loadPortion=graph",
data: "partnerSelect="+$rootScope.partnerSelect,
success: function(msg){
if (box1) box1.remove();
$("#divId_graph").html(msg);
}
});
the the ch-div-content.html is the part i want to reload and it is as follows
<?php if ($loadPortion == 'graph'){ ?>
<script language="javascript">
if($( ".graph" )[1]!==undefined){
$( ".graph" )[1].remove();
}
</script>
<div class="graph" id="graph" style="margin-top:25px">
</div>