jquery - how to pass a dynamic div id to highchart -
i have dynamic tab created using jquery ui. want add together high chart div created jquery ui. when pass id "renderto" of highchart options says error #13. have looked , according highcharts couldn't find div.
so suggestion how can prepare this..?
function minig_help() { $("#tab_container").tabs("add","#tabs-1","123"); $( "#tab_container" ).tabs( "refresh" ); plotgraph(url_temp,"#tabs-1"); } function plotgraph(url,divid) { .................. options.chart={renderto: divid}; }
this error occurs because div hasn't been written dom yet, , not exist when seek create chart. create sure element written page before creating chart.
one suggestion phone call method create chart on load of tabs. there "load" event can tie (http://api.jqueryui.com/tabs/#event-load):
$( ".selector" ).tabs({ load: function( event, ui ) { //call method create chart } });
jquery html jquery-ui highcharts highstock
No comments:
Post a Comment